/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false; } else if (getHttpServletRequest() == null) { log.debug("No HttpServletRequest available"); return false; } return true; }
/** {@inheritDoc} */ @Override protected void doInitialize() throws ComponentInitializationException { super.doInitialize(); if (resultMergingStrategy == null) { resultMergingStrategy = new DefaultResultMergingStrategy(); } }
/** {@inheritDoc} */ @Override protected final void doExecute( @Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext) { doExecute(profileRequestContext, authnContext); }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (profileRequestContext.isBrowserProfile()) { log.debug("{} Request does not have non-browser requirement, nothing to do", getLogPrefix()); return false; } return super.doPreExecute(profileRequestContext, authenticationContext); }
/** {@inheritDoc} */ @Override protected void doInitialize() throws ComponentInitializationException { super.doInitialize(); if (sessionManager == null) { throw new ComponentInitializationException("SessionManager cannot be null"); } }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (!authenticationContext.isPassive()) { log.debug("{} Request does not have passive requirement, nothing to do", getLogPrefix()); return false; } return super.doPreExecute(profileRequestContext, authenticationContext); }
/** {@inheritDoc} */ @Override protected void doInitialize() throws ComponentInitializationException { super.doInitialize(); if (!getActivationCondition().equals(Predicates.alwaysFalse()) && sessionManager == null) { throw new ComponentInitializationException("SessionManager cannot be null"); } }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false; } mfaContext = multiFactorContextLookupStrategy.apply(profileRequestContext); if (mfaContext == null) { log.error("{} No MultiFactorAuthenticationContext found by lookup strategy", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX); return false; } return true; }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false; } mfaContext = multiFactorContextLookupStrategy.apply(profileRequestContext); if (mfaContext == null) { log.error("{} No MultiFactorAuthenticationContext found by lookup strategy", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX); return false; } return true; }
/** {@inheritDoc} */ @Override protected final boolean doPreExecute( @Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext) { if (super.doPreExecute(profileRequestContext)) { authnContext = authnCtxLookupStrategy.apply(profileRequestContext); if (authnContext == null) { ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.INVALID_AUTHN_CTX); return false; } return doPreExecute(profileRequestContext, authnContext); } else { return false; } }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (!authenticationContext.isForceAuthn() && authenticationContext.getMaxAge() == 0) { log.debug("{} Request does not have forced authentication requirement, nothing to do", getLogPrefix()); return false; } return super.doPreExecute(profileRequestContext, authenticationContext); }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this); if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false; } authnRequest = authnRequestLookupStrategy.apply(profileRequestContext); if (authnRequest == null) { log.debug("{} AuthnRequest message was not returned by lookup strategy", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_MSG_CTX); return false; } return true; }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext) || attributeId == null) { return false; } DeprecationSupport.warnOnce(ObjectType.ACTION, getClass().getSimpleName(), null, "the MFA login flow"); final AttributeContext attributeCtx = attributeContextLookupStrategy.apply(profileRequestContext); if (attributeCtx == null) { log.debug("{} Request does not contain an AttributeContext, nothing to do", getLogPrefix()); return false; } attribute = attributeCtx.getIdPAttributes().get(attributeId); if (attribute == null || attribute.getValues().isEmpty()) { log.debug("{} Attribute {} has no values, nothing to do", getLogPrefix(), attributeId); return false; } return true; }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false; } sessionCtx = sessionContextLookupStrategy.apply(profileRequestContext); if (sessionCtx == null || sessionCtx.getIdPSession() == null) { log.debug("{} No previous session found, nothing to do", getLogPrefix()); return false; } final SubjectCanonicalizationContext c14n = c14nContextLookupStrategy.apply(profileRequestContext); if (c14n == null || c14n.getPrincipalName() == null) { log.debug("{} Reusing identity from session, nothing to do", getLogPrefix()); return false; } newPrincipalName = c14n.getPrincipalName(); return true; }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext, @Nonnull final AuthenticationContext authenticationContext) { if (super.doPreExecute(profileRequestContext, authenticationContext) && authenticationContext.getAuthenticationResult() != null) { subjectCtx = subjectContextLookupStrategy.apply(profileRequestContext); sessionCtx = sessionContextCreationStrategy.apply(profileRequestContext); if (sessionCtx == null) { log.error("{} SessionContext creation failed", getLogPrefix()); ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX); return false; } // We can only do work if a session exists or a non-empty SubjectContext exists. return sessionCtx.getIdPSession() != null || (subjectCtx != null && subjectCtx.getPrincipalName() != null); } return false; }
@Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false;
@Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false; } else if (authenticationContext.getSubcontext(RequestedPrincipalContext.class) != null
@Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false;
@Nonnull final AuthenticationContext authenticationContext) { if (!super.doPreExecute(profileRequestContext, authenticationContext)) { return false; } else if (authenticationContext.getAttemptedFlow() == null) {
return super.doPreExecute(profileRequestContext, authenticationContext);