public class ValidateExternalAuthentication extends AbstractValidationAction
ExternalAuthenticationContext and directly produces an
AuthenticationResult or records error state based on the
contents.EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, AuthnEventIds.INVALID_AUTHN_CTX, AuthnEventIds.AUTHN_EXCEPTION, AuthnEventIds.NO_CREDENTIALSProfileRequestContext.getSubcontext(AuthenticationContext.class).getAttemptedFlow() != null
AuthenticationResult is saved to the AuthenticationContext on a
successful login. On a failed login, the
AbstractValidationAction.handleError(ProfileRequestContext, AuthenticationContext, Exception, String)
method is called.| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFAULT_METRIC_NAME
Default prefix for metrics.
|
private ExternalAuthenticationContext |
extContext
Context containing the result to validate.
|
private org.slf4j.Logger |
log
Class logger.
|
private Pattern |
matchExpression
A regular expression to apply for acceptance testing.
|
| Constructor and Description |
|---|
ValidateExternalAuthentication()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkUsername(Subject subject)
Validate the username if necessary.
|
protected void |
doExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected Subject |
populateSubject(Subject subject) |
void |
setMatchExpression(Pattern expression)
Set a matching expression to apply for username acceptance.
|
addDefaultPrincipals, buildAuthenticationResult, getClassifiedErrors, getMetricName, getResultCachingPredicate, getSubject, getSupportedPrincipals, handleError, handleError, handleWarning, recordFailure, recordSuccess, setAddDefaultPrincipals, setClassifiedMessages, setMetricName, setRequesterLookupStrategy, setResponderLookupStrategy, setResultCachingPredicate, setSupportedPrincipalsdoExecute, doPreExecute, setLookupStrategydoExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull @NotEmpty private static final String DEFAULT_METRIC_NAME
@Nonnull private final org.slf4j.Logger log
@Nullable private Pattern matchExpression
@Nullable private ExternalAuthenticationContext extContext
public ValidateExternalAuthentication()
public void setMatchExpression(@Nullable Pattern expression)
expression - a matching expressionprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doPreExecute in class AbstractValidationActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doExecute in class AbstractAuthenticationAction@Nonnull protected Subject populateSubject(@Nonnull Subject subject)
populateSubject in class AbstractValidationActionprivate boolean checkUsername(@Nonnull Subject subject)
subject - subject containing a UsernamePrincipal to checkCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.