public class ValidateUsernamePasswordAgainstLDAP extends AbstractUsernamePasswordValidationAction
UsernamePasswordContext and directly produces an
AuthenticationResult based on that identity by authenticating against an LDAP.EventIds.PROCEED_EVENT_ID, AuthnEventIds.AUTHN_EXCEPTION, AuthnEventIds.ACCOUNT_WARNING, AuthnEventIds.ACCOUNT_ERROR, AuthnEventIds.INVALID_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, String, String) method is called.| Modifier and Type | Field and Description |
|---|---|
private Authenticator |
authenticator
LDAP authenticator.
|
private static String |
DEFAULT_METRIC_NAME
Default prefix for metrics.
|
private org.slf4j.Logger |
log
Class logger.
|
private AuthenticationResponse |
response
Authentication response associated with the login.
|
private String[] |
returnAttributes
Attributes to return from authentication.
|
| Constructor and Description |
|---|
ValidateUsernamePasswordAgainstLDAP()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected void |
doInitialize() |
Authenticator |
getAuthenticator()
Returns the authenticator.
|
String[] |
getReturnAttributes()
Returns the return attributes.
|
protected Subject |
populateSubject(Subject subject) |
void |
setAuthenticator(Authenticator auth)
Sets the authenticator.
|
void |
setReturnAttributes(String... attributes)
Sets the return attributes.
|
doPreExecute, getLockoutManager, getUsernamePasswordContext, recordFailure, recordSuccess, removeContextAfterValidation, savePasswordToCredentialSet, setLockoutManager, setMatchExpression, setRemoveContextAfterValidation, setSavePasswordToCredentialSetaddDefaultPrincipals, 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, 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
@Nonnull private Authenticator authenticator
@Nullable private String[] returnAttributes
@Nullable private AuthenticationResponse response
public ValidateUsernamePasswordAgainstLDAP()
@NonnullAfterInit public Authenticator getAuthenticator()
public void setAuthenticator(@Nonnull Authenticator auth)
auth - to authenticate with@Nullable public String[] getReturnAttributes()
public void setReturnAttributes(@Nullable String... attributes)
attributes - attribute namesprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doExecute in class AbstractAuthenticationAction@Nonnull protected Subject populateSubject(@Nonnull Subject subject)
populateSubject in class AbstractUsernamePasswordValidationActionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.