/** * Return the first inactive potential flow not found in the intermediate flows collection that applies * to the request. * * @param profileRequestContext the current profile request context * @param authenticationContext the current authentication context * @return an eligible flow, or null */ @Nullable private AuthenticationFlowDescriptor getUnattemptedInactiveFlow( @Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { AuthenticationFlowDescriptor selectedFlow = null; for (final AuthenticationFlowDescriptor flow : authenticationContext.getPotentialFlows().values()) { if (!authenticationContext.getIntermediateFlows().containsKey(flow.getId())) { if (!authenticationContext.isPassive() || flow.isPassiveAuthenticationSupported()) { if (flow.apply(profileRequestContext)) { selectedFlow = flow; if (preferredPrincipalCtx == null || preferredPrincipalCtx.isAcceptable(flow)) { break; } } } } } return selectedFlow; }
candidate.getAuthenticationFlowId()); if (descriptor != null) { if (descriptor.apply(profileRequestContext)) { if (descriptor.isResultActive(candidate)) { if (authenticationContext.getMaxAge() > 0
if (activeFlows.contains(flowId)) { if (authenticationContext.getAvailableFlows().containsKey(desc.getId()) && desc.apply(profileRequestContext)) { authenticationContext.getPotentialFlows().put(desc.getId(), desc); } else { for (final AuthenticationFlowDescriptor desc : potentialFlows) { if (authenticationContext.getAvailableFlows().containsKey(desc.getId()) && desc.apply(profileRequestContext)) { authenticationContext.getPotentialFlows().put(desc.getId(), desc); } else {
for (final AuthenticationFlowDescriptor descriptor : potentialFlows.values()) { if (!authenticationContext.getIntermediateFlows().containsKey(descriptor.getId()) && predicate.apply(descriptor) && descriptor.apply(profileRequestContext)) { if (!authenticationContext.isPassive() || descriptor.isPassiveAuthenticationSupported()) { selectInactiveFlow(profileRequestContext, authenticationContext, descriptor);
for (final AuthenticationFlowDescriptor descriptor : potentialFlows.values()) { if (!authenticationContext.getIntermediateFlows().containsKey(descriptor.getId()) && predicate.apply(descriptor) && descriptor.apply(profileRequestContext)) {
final PrincipalEvalPredicate predicate = requestedPrincipalCtx.getPredicate(p); if (predicate != null) { if (predicate.apply(flow) && flow.apply(profileRequestContext)) { selectInactiveFlow(profileRequestContext, authenticationContext, flow); return; } else if (flow.apply(profileRequestContext)) { selectInactiveFlow(profileRequestContext, authenticationContext, flow); return;