<p>
The explicit authentication flows.
</p>

@param explicitAuthFlows
The explicit authentication flows.
@return Returns a reference to this object so that method calls can be chained together.
@see ExplicitAuthFlowsType
178177
public CreateUserPoolClientRequest withExplicitAuthFlows(ExplicitAuthFlowsType... explicitAuthFlows) {
        java.util.ArrayList<String> explicitAuthFlowsCopy = new java.util.ArrayList<String>(explicitAuthFlows.length);
        for (ExplicitAuthFlowsType value : explicitAuthFlows) {
            explicitAuthFlowsCopy.add(value.toString());
        }
        if (getExplicitAuthFlows() == null) {
            setExplicitAuthFlows(explicitAuthFlowsCopy);
        } else {
            getExplicitAuthFlows().addAll(explicitAuthFlowsCopy);
        }
        return this;
    }
366895
public ClientConnection createConnectionWithFlowDisabled(final ReplyProcessor rp) {
        Exceptions.checkNotClosed(closed.get(), this);
        Preconditions.checkState(!disableFlow.getAndSet(true), "Flows are disabled, incorrect usage pattern.");
        log.info("Creating a new connection with flow disabled for endpoint {}. The current Channel is {}.", connectionName, channel.get());
        flowIdReplyProcessorMap.put(FLOW_DISABLED, rp);
        return new ClientConnectionImpl(connectionName, FLOW_DISABLED, batchSizeTracker, this);
    }
224385
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
		Assert.isInstanceOf(SocialAuthenticationToken.class, authentication, "unsupported authentication type");
		Assert.isTrue(!authentication.isAuthenticated(), "already authenticated");
		SocialAuthenticationToken authToken = (SocialAuthenticationToken) authentication;
		String providerId = authToken.getProviderId();
		Connection<?> connection = authToken.getConnection();

		String userId = toUserId(connection);
		if (userId == null) {
			throw new BadCredentialsException("Unknown access token");
		}

		UserDetails userDetails = userDetailsService.loadUserByUserId(userId);
		if (userDetails == null) {
			throw new UsernameNotFoundException("Unknown connected account id");
		}

		return new SocialAuthenticationToken(connection, userDetails, authToken.getProviderAccountData(), getAuthorities(providerId, userDetails));
	}
411521
@Override
    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
        if (authentication == null) {
            return authentication;
        }
        UsernamePasswordAuthenticationToken output = null;
        if (authentication instanceof UsernamePasswordAuthenticationToken) {
            output = (UsernamePasswordAuthenticationToken) authentication;
        } else {
            output = new UsernamePasswordAuthenticationToken(authentication, authentication.getCredentials(),
                            authentication.getAuthorities());
            output.setAuthenticated(authentication.isAuthenticated());
            output.setDetails(authentication.getDetails());
        }
        return delegate.authenticate(output);
    }
1135910
protected void createInitialAuthenticationRequestValidationCheckAction(final Flow flow) {
        val action = createActionState(flow, CasWebflowConstants.STATE_ID_INITIAL_AUTHN_REQUEST_VALIDATION_CHECK,
            CasWebflowConstants.ACTION_ID_INITIAL_AUTHN_REQUEST_VALIDATION);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE, CasWebflowConstants.STATE_ID_HANDLE_AUTHN_FAILURE);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_ERROR, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_TICKET_GRANTING_TICKET_CHECK);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS, CasWebflowConstants.STATE_ID_SHOW_AUTHN_WARNING_MSGS);
    }
996110
public java.util.List<ClientVpnAuthentication> getAuthenticationOptions() {
        if (authenticationOptions == null) {
            authenticationOptions = new com.amazonaws.internal.SdkInternalList<ClientVpnAuthentication>();
        }
        return authenticationOptions;
    }
1117789
public GetStatFlowResponse getStatFlow(GetStatFlowRequest request) {
        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, STAT, "flow");
        
        if (request.getStartTime() != null) {
            internalRequest.addParameter("startTime", DateUtils.formatAlternateIso8601Date(request.getStartTime()));
        }
        
        if (request.getEndTime() != null) {
            internalRequest.addParameter("endTime", DateUtils.formatAlternateIso8601Date(request.getEndTime()));
        }
        
        if (request.getDomain() != null) {
            internalRequest.addParameter("domain", request.getDomain());
        }
        
        if (request.getPeriod() != null) {
            internalRequest.addParameter("period", String.valueOf(request.getPeriod()));
        }
        
        if (request.isWithRegion()) {
            internalRequest.addParameter("withRegion", "");
        }
        return this.invokeHttpClient(internalRequest, GetStatFlowResponse.class);
    }
496843
public java.util.List<String> getFlowLogIds() {
        if (flowLogIds == null) {
            flowLogIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return flowLogIds;
    }
828008
public static FaceAPI authenticate(String baseUrl, final String subscriptionKey) {
        ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() {
            @Override
            public void applyCredentialsFilter(OkHttpClient.Builder builder) {
                builder.addNetworkInterceptor(
                        new Interceptor() {
                            @Override
                            public Response intercept(Chain chain) throws IOException {
                                Request request = null;
                                Request original = chain.request();
                                // Request customization: add request headers
                                Request.Builder requestBuilder = original.newBuilder()
                                        .addHeader("Ocp-Apim-Subscription-Key", subscriptionKey);
                                request = requestBuilder.build();
                                return chain.proceed(request);
                            }
                        });
            }
        };
        return authenticate(baseUrl, serviceClientCredentials);
    }
319625
public com.google.api.Authentication getAuthentication() {
    return authentication_ == null ? com.google.api.Authentication.getDefaultInstance() : authentication_;
  }
1318384
public FacesConfigFlowDefinitionFlowCallType<FacesConfigFlowDefinitionType<T>> getOrCreateFlowCall()
   {
      List<Node> nodeList = childNode.get("flow-call");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigFlowDefinitionFlowCallTypeImpl<FacesConfigFlowDefinitionType<T>>(this, "flow-call", childNode, nodeList.get(0));
      }
      return createFlowCall();
   }
954350
public Flow[] getFlows()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getFlows");
    }
    Flow[] clonedFlows = flows.clone();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {    
      SibTr.exit(tc, "getFlows", clonedFlows);
    }    
    return clonedFlows;
  }
388833
@SuppressWarnings({ "rawtypes", "unchecked" })
	private IntegrationFlowBuilder getFlowBuilder() {

		IntegrationFlowBuilder flowBuilder;
		URLName urlName = this.properties.getUrl();

		if (this.properties.isIdleImap()) {
			flowBuilder = getIdleImapFlow(urlName);
		}
		else {

			MailInboundChannelAdapterSpec adapterSpec;
			switch (urlName.getProtocol().toUpperCase()) {
				case "IMAP":
				case "IMAPS":
					adapterSpec = getImapFlowBuilder(urlName);
					break;
				case "POP3":
				case "POP3S":
					adapterSpec = getPop3FlowBuilder(urlName);
					break;
				default:
					throw new IllegalArgumentException(
							"Unsupported mail protocol: " + urlName.getProtocol());
			}
			flowBuilder = IntegrationFlows.from(
					adapterSpec.javaMailProperties(getJavaMailProperties(urlName))
							.selectorExpression(this.properties.getExpression())
							.shouldDeleteMessages(this.properties.isDelete()),
					new Consumer<SourcePollingChannelAdapterSpec>() {

						@Override
						public void accept(
								SourcePollingChannelAdapterSpec sourcePollingChannelAdapterSpec) {
							sourcePollingChannelAdapterSpec.poller(MailSourceConfiguration.this.defaultPoller);
						}

					});

		}
		return flowBuilder;
	}
1014633
protected void augmentMultifactorProviderFlowRegistry(final FlowDefinitionRegistry mfaProviderFlowRegistry) {
        val flowIds = mfaProviderFlowRegistry.getFlowDefinitionIds();
        Arrays.stream(flowIds).forEach(id -> {
            val flow = (Flow) mfaProviderFlowRegistry.getFlowDefinition(id);
            if (flow != null && containsFlowState(flow, CasWebflowConstants.STATE_ID_REAL_SUBMIT)) {
                val states = getCandidateStatesForMultifactorAuthentication();
                states.forEach(s -> {
                    val state = getState(flow, s);
                    ensureEndStateTransitionExists(state, flow, CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_SUCCESS);
                    ensureEndStateTransitionExists(state, flow, CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS, CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS);
                    ensureEndStateTransitionExists(state, flow, CasWebflowConstants.TRANSITION_ID_UNAVAILABLE, CasWebflowConstants.STATE_ID_MFA_UNAVAILABLE);
                    ensureEndStateTransitionExists(state, flow, CasWebflowConstants.TRANSITION_ID_DENY, CasWebflowConstants.STATE_ID_MFA_DENIED);
                });
            }
        });

    }
372995
@Override
    @Transactional(value = "transactionManager", readOnly = true)
    public Authentication authenticate(Authentication authentication)
        throws AuthenticationException {

        // prepare an exception
        final String exceptionMessage = "User and password do not match.";

        // get username/password
        String accountName = authentication.getName();
        String rawPassword = (String) authentication.getCredentials();

        LOG.debug("Trying to authenticate User '" + accountName + "'");

        User user = userDao.findByAccountName(accountName);

        // prepare set of authorities
        Set<GrantedAuthority> grantedAuthorities = new HashSet<GrantedAuthority>();

        String encryptedPassword = null;

        if (user == null) {
            LOG.warn("No user for account name '" + accountName + "' could be found.");
            throw new UsernameNotFoundException(exceptionMessage);
        } else if (!user.isActive()) {
            LOG.warn("The user with the account name '" + accountName + "' is not active.");
            throw new DisabledException(exceptionMessage);
        } else {

            encryptedPassword = user.getPassword();

            // check if rawPassword matches the hash from db
            if (passwordEncoder.matches(rawPassword, encryptedPassword)) {

                Set<Role> allUserRoles = getAllUserRoles(user);

                // create granted authorities for the security context
                for (Role role : allUserRoles) {
                    grantedAuthorities.add(new SimpleGrantedAuthority(role.getName()));
                }

            } else {
                LOG.warn("The given password for user '" + accountName + "' does not match.");
                throw new BadCredentialsException(exceptionMessage);
            }

        }

        // Create corresponding token to forward in Spring Security's filter
        // chain. We will use the SHOGun-Core user as the principal.
        Authentication authResult = null;
        if (grantedAuthorities.isEmpty()) {
            // if the user has no authorities, we will build the
            // UsernamePasswordAuthenticationToken without authorities, which
            // leads to an unauthenticated user, i.e. isAuthenticated() of
            // authenticationToken will return false afterwards.
            LOG.warn("The user '" + accountName + "' has no authorities and will thereby NOT be authenticated.");
            authResult = new UsernamePasswordAuthenticationToken(user, encryptedPassword);
        } else {
            // if we pass some grantedAuthorities, isAuthenticated() of
            // authenticationToken will return true afterwards
            authResult = new UsernamePasswordAuthenticationToken(user, encryptedPassword, grantedAuthorities);

            LOG.debug("The user '" + accountName
                + "' got the following (explicit) roles: "
                + StringUtils.join(getRawRoleNames(grantedAuthorities), ", "));
        }

        final boolean isAuthenticated = authResult.isAuthenticated();
        final String authLog = isAuthenticated ? "has succesfully" : "has NOT";
        LOG.info("The user '" + accountName + "' " + authLog + " been authenticated.");

        return authResult;
    }
894586
public static String getPasswordResetToken(final RequestContext requestContext) {
        val flowScope = requestContext.getFlowScope();
        return flowScope.getString(FLOWSCOPE_PARAMETER_NAME_TOKEN);
    }
882314
public static String usingAuthentication(String url) {
        if (authenticationTypes.BASIC.toString().equals(getInstance().authenticationType)) {
            return url.replace("://", "://" + getLogin() + ":" + getPassword() + "@");
        }
        return url;

    }