public class ExtractUsernamePasswordFromBasicAuth extends AbstractExtractionAction
HttpHeaders.AUTHORIZATION header,
creates a UsernamePasswordContext, and attaches it to the AuthenticationContext.EventIds.PROCEED_EVENT_ID, AuthnEventIds.NO_CREDENTIALS, AuthnEventIds.INVALID_CREDENTIALSProfileRequestContext.getSubcontext(AuthenticationContext.class, false) != null
HttpHeaders.AUTHORIZATION
header is parsed and any correctly-encoded information will be attached via a UsernamePasswordContext.| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Class logger.
|
| Constructor and Description |
|---|
ExtractUsernamePasswordFromBasicAuth() |
| Modifier and Type | Method and Description |
|---|---|
protected Pair<String,String> |
decodeCredentials(String encodedCredentials)
Decodes the credential string provided in the HTTP header,
splits it in to a username and password, and returns them.
|
protected void |
doExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected String |
extractCredentials(javax.servlet.http.HttpServletRequest httpRequest)
Gets the encoded credentials passed in via the
HttpHeaders.AUTHORIZATION header. |
applyTransforms, setLowercase, setTransforms, setTrim, setUppercasedoExecute, doPreExecute, 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 private final org.slf4j.Logger log
public ExtractUsernamePasswordFromBasicAuth()
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doExecute in class AbstractAuthenticationAction@Nullable protected String extractCredentials(@Nonnull javax.servlet.http.HttpServletRequest httpRequest)
HttpHeaders.AUTHORIZATION header. This method checks to
ensure that the authentication scheme is HttpServletRequest.BASIC_AUTH and then strips off
and returns the follow on Base64-encoded credentials.httpRequest - current HTTP request@Nullable protected Pair<String,String> decodeCredentials(@Nonnull@NotEmpty String encodedCredentials)
encodedCredentials - the Base64 encoded credentialsCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.