Put authentication result builder.

@param builder the builder
@param ctx     the ctx
778621
public static void putAuthenticationResultBuilder(final AuthenticationResultBuilder builder, final RequestContext ctx) {
        ctx.getConversationScope().put(PARAMETER_AUTHENTICATION_RESULT_BUILDER, builder);
    }
821715
protected final void buildResolved(ResolvedMacro c, BuilderT builder, Context context)
    {
        Component processed = c.getFormatter().process(c.getInput(), context, c.getArguments());
        buildAny(processed, builder, context);
    }
574789
protected void addStepFailureContextData(
            StepExecutionResult stepResult,
            ExecutionContextImpl.Builder builder
    )
    {
        HashMap<String, String>
                resultData = new HashMap<>();
        if (null != stepResult.getFailureData()) {
            //convert values to string
            for (final Map.Entry<String, Object> entry : stepResult.getFailureData().entrySet()) {
                resultData.put(entry.getKey(), entry.getValue().toString());
            }
        }
        FailureReason reason = stepResult.getFailureReason();
        if (null == reason) {
            reason = StepFailureReason.Unknown;
        }
        resultData.put("reason", reason.toString());
        String message = stepResult.getFailureMessage();
        if (null == message) {
            message = "No message";
        }
        resultData.put("message", message);
        //add to data context

        builder.setContext("result", resultData);
    }
591333
public static void putAuthentication(final Authentication authentication, final RequestContext ctx) {
        ctx.getConversationScope().put(PARAMETER_AUTHENTICATION, authentication);
    }
106737
protected function addWithoutNotVerified(Builder $builder): void
    {
        $builder->macro('withoutNotVerified', function (Builder $builder) {
            return $builder->withoutGlobalScope($this)->whereNotNull('verified_at');
        });
    }
323075
public void registerOnMessage(Message.Builder builder) {
    messageMap.put(builder.getDescriptorForType().getFullName(), builder);
  }
80293
private void appendValue(StringBuilder builder, Class fieldClazz, Object value, boolean useToken)
    {
        // To allow handle byte array class object by converting it to string

        if (fieldClazz != null && fieldClazz.isAssignableFrom(byte[].class))
        {
            value = value != null ? value : ByteBufferUtil.EMPTY_BYTE_BUFFER.array();
            StringBuilder hexstr = new StringBuilder("0x");
            builder.append(hexstr.append((Hex.encodeHex((byte[]) value))));
        }
        else
        {
            if (useToken)
            {
                builder.append(TOKEN);
            }

            if (fieldClazz != null
                    && value != null
                    && (fieldClazz.isAssignableFrom(String.class) || isDate(fieldClazz)
                            || fieldClazz.isAssignableFrom(char.class) || fieldClazz.isAssignableFrom(Character.class) || value instanceof Enum))
            {

                if (fieldClazz.isAssignableFrom(String.class))
                {
                    // To allow escape character
                    value = ((String) value).replaceAll("'", "''");
                }
                builder.append("'");

                if (isDate(fieldClazz)) // For CQL, date has to
                                        // be in date.getTime()
                {
                    builder.append(PropertyAccessorFactory.getPropertyAccessor(fieldClazz).toString(value));
                }
                else if (value instanceof Enum)
                {
                    builder.append(((Enum) value).name());
                }

                else
                {
                    builder.append(value);
                }
                builder.append("'");
            }
            else
            {
                builder.append(value);
            }

        }
        if (useToken)
        {
            builder.append(CLOSE_BRACKET);
        }
    }
1251356
private static AWSSecurityTokenService buildStsClient(Builder builder) throws
                                                                           IllegalArgumentException {
        /**
         * Passing two types of credential interfaces is not permitted
         */
        if (builder.longLivedCredentials != null && builder.longLivedCredentialsProvider != null) {
            throw new IllegalArgumentException(
                    "It is illegal to set both an AWSCredentials and an AWSCredentialsProvider for an " +
                    STSAssumeRoleSessionCredentialsProvider.class.getName());
        }

        AWSCredentialsProvider longLivedCredentialsProvider = null;
        if (builder.longLivedCredentials != null) {
            longLivedCredentialsProvider = new StaticCredentialsProvider(
                    builder.longLivedCredentials);
        } else if (builder.longLivedCredentialsProvider != null) {
            longLivedCredentialsProvider = builder.longLivedCredentialsProvider;
        }

        // Depending on which options are explicitly provided we have to call the right overloaded constructor so
        // defaults are properly applied.
        if (longLivedCredentialsProvider == null) {
            if (builder.clientConfiguration == null) {
                return new AWSSecurityTokenServiceClient();
            } else {
                return new AWSSecurityTokenServiceClient(builder.clientConfiguration);
            }
        } else {
            if (builder.clientConfiguration == null) {
                return new AWSSecurityTokenServiceClient(longLivedCredentialsProvider);
            } else {
                return new AWSSecurityTokenServiceClient(longLivedCredentialsProvider,
                                                         builder.clientConfiguration);
            }
        }
    }
86607
public DescriptionBuilder property(final Consumer<PropertyBuilder> builder) {
        PropertyBuilder propertyBuilder = PropertyBuilder.builder();
        builder.accept(propertyBuilder);
        replaceOrAddProperty(propertyBuilder.build());
        return this;
    }
428184
@SuppressWarnings("unchecked")
    public <T> ProcessorBuilder<T> register(final Class<T> type, final ProcessorBuilder<T> builder) {
        return (ProcessorBuilder<T>)this.builderMap.put(type, builder);
    }
11325
protected void populateAuthenticationMetadataAttributes(final AuthenticationBuilder builder,
                                                            final AuthenticationTransaction transaction) {
        LOGGER.debug("Invoking authentication metadata populators for authentication transaction");
        val pops = getAuthenticationMetadataPopulatorsForTransaction(transaction);
        pops.forEach(populator -> transaction.getCredentials()
            .stream()
            .filter(populator::supports)
            .forEach(credential -> populator.populateAttributes(builder, transaction)));
    }
152155
protected function addReject(Builder $builder)
    {
        $builder->macro('reject', function (Builder $builder, $id = null) {
            $builder->withAnyStatus();
            return $this->updateModerationStatus($builder, $id, Status::REJECTED);

        });
    }
419641
public static void putAuthenticationResult(final AuthenticationResult authenticationResult, final RequestContext context) {
        context.getConversationScope().put(PARAMETER_AUTHENTICATION_RESULT, authenticationResult);
    }
1108632
public String sign(JWTCreator.Builder builder) {
        // use the strongest algorithm;
        return builder.sign(Algorithm.ECDSA512(ecPublicKey, ecPrivateKey));
    }
1003785
protected void setAuthenticatingAuthority(Assertion assertion, Assertion proxiedAssertion) {
    if (proxiedAssertion.getIssuer() == null || proxiedAssertion.getIssuer().getValue() == null) {
      log.warn("No issuer element found in proxied assertion");
      return;
    }
    if (assertion.getAuthnStatements().isEmpty()) {
      log.warn("No AuthnStatement available is assertion to update - will not process");
      return;
    }
    AuthnStatement authnStatement = assertion.getAuthnStatements().get(0);
    if (authnStatement.getAuthnContext() == null) {
      log.warn("No AuthnContext found in assertion to update - will not process");
    }

    final XMLObjectBuilderFactory bf = XMLObjectProviderRegistrySupport.getBuilderFactory();

    SAMLObjectBuilder<AuthenticatingAuthority> aaBuilder = (SAMLObjectBuilder<AuthenticatingAuthority>) bf
      .<AuthenticatingAuthority> getBuilderOrThrow(AuthenticatingAuthority.DEFAULT_ELEMENT_NAME);

    AuthenticatingAuthority aa = aaBuilder.buildObject();
    aa.setURI(proxiedAssertion.getIssuer().getValue());

    authnStatement.getAuthnContext().getAuthenticatingAuthorities().add(aa);
    log.info("Updated Assertion with AuthenticatingAuthority ({})", aa.getURI());
  }
314220
protected void configure(final T builder, final String name) {
        configureKeepAlive(builder, name);
        configureSecurity(builder, name);
        configureLimits(builder, name);
        configureCompression(builder, name);
        for (final GrpcChannelConfigurer channelConfigurer : this.channelConfigurers) {
            channelConfigurer.accept(builder, name);
        }
    }
205418
public static ClientConfigurationBuilder builder(final String url, final String username, final String password) {
        return new ClientConfigurationBuilder(url, username, password);
    }