public class ExternalAuthentication extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHENTICATING_AUTHORITIES_KEY
Request attribute to which a collection of authenticating authorities may be bound.
|
static String |
AUTHENTICATION_ERROR_KEY
Request attribute to which an error message may be bound.
|
static String |
AUTHENTICATION_EXCEPTION_KEY
Request attribute to which an exception may be bound.
|
static String |
AUTHENTICATION_INSTANT_KEY
Request attribute to which an authentication timestamp may be bound.
|
static String |
AUTHN_METHOD_PARAM
Deprecated.
|
static String |
CONVERSATION_KEY
Parameter supplied to identify the per-conversation structure in the session.
|
static String |
DONOTCACHE_KEY
Request attribute to which a signal not to cache the result may be bound.
|
static String |
EXTENDED_FLOW_PARAM
Request attribute that indicates whether we're being called as an extension of another login flow.
|
static String |
FORCE_AUTHN_PARAM
Request attribute that indicates whether the authentication request requires forced authentication.
|
static String |
PASSIVE_AUTHN_PARAM
Request attribute that indicates whether the authentication requires passive authentication.
|
static String |
PREVIOUSRESULT_KEY
Request attribute to which a signal to set
AuthenticationResult.setPreviousResult(boolean) may be bound. |
static String |
PRINCIPAL_KEY
Request attribute to which user's principal should be bound.
|
static String |
PRINCIPAL_NAME_KEY
Request attribute to which user's principal name should be bound.
|
static String |
RELYING_PARTY_PARAM
Request attribute that provides the entity ID of the relying party that is requesting authentication.
|
static String |
REVOKECONSENT_KEY
Request attribute to which a signal to revoke consent for attribute release may be bound.
|
static String |
SUBJECT_KEY
Request attribute to which user's subject should be bound.
|
| Constructor and Description |
|---|
ExternalAuthentication() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFinish(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Complete a request for external authentication by seeking out the information stored in
request attributes and transferring to the session's conversation state, and then transfer
control back to the authentication web flow.
|
protected void |
doStart(javax.servlet.http.HttpServletRequest request)
Initialize a request for external authentication by seeking out the information stored in
the servlet session and exposing it as request attributes.
|
static void |
finishExternalAuthentication(String key,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Complete a request for external authentication by seeking out the information stored in
request attributes and transferring to the session's conversation state, and then transfer
control back to the authentication web flow.
|
static String |
getExternalRedirect(String baseLocation,
String conversationValue)
Computes the appropriate location to pass control to to invoke an external authentication mechanism.
|
protected ProfileRequestContext |
getProfileRequestContext(javax.servlet.http.HttpServletRequest request)
Get the
ProfileRequestContext associated with a request. |
static ProfileRequestContext |
getProfileRequestContext(String key,
javax.servlet.http.HttpServletRequest request)
Get the
ProfileRequestContext associated with a request. |
static String |
startExternalAuthentication(javax.servlet.http.HttpServletRequest request)
Initialize a request for external authentication by seeking out the information stored in
the servlet session and exposing it as request attributes.
|
@Nonnull @NotEmpty public static final String CONVERSATION_KEY
@Nonnull @NotEmpty public static final String PRINCIPAL_KEY
@Nonnull @NotEmpty public static final String PRINCIPAL_NAME_KEY
@Nonnull @NotEmpty public static final String SUBJECT_KEY
@Nonnull @NotEmpty public static final String AUTHENTICATION_INSTANT_KEY
@Nonnull @NotEmpty public static final String AUTHENTICATING_AUTHORITIES_KEY
@Nonnull @NotEmpty public static final String AUTHENTICATION_ERROR_KEY
@Nonnull @NotEmpty public static final String AUTHENTICATION_EXCEPTION_KEY
@Nonnull @NotEmpty public static final String DONOTCACHE_KEY
@Nonnull @NotEmpty public static final String REVOKECONSENT_KEY
@Nonnull @NotEmpty public static final String PREVIOUSRESULT_KEY
AuthenticationResult.setPreviousResult(boolean) may be bound.@Nonnull @NotEmpty public static final String FORCE_AUTHN_PARAM
@Nonnull @NotEmpty public static final String PASSIVE_AUTHN_PARAM
@Deprecated @Nonnull @NotEmpty public static final String AUTHN_METHOD_PARAM
@Nonnull @NotEmpty public static final String RELYING_PARTY_PARAM
@Nonnull @NotEmpty public static final String EXTENDED_FLOW_PARAM
@Nonnull @NotEmpty public static String getExternalRedirect(@Nonnull@NotEmpty String baseLocation, @Nonnull@NotEmpty String conversationValue)
The input location should be suitable for use in a Spring "externalRedirect" expression, and may contain a query string. The result will include any additional parameters needed to invoke the mechanism.
baseLocation - the base location to build off ofconversationValue - the value to include as a conversation ID@Nonnull @NotEmpty public static String startExternalAuthentication(@Nonnull javax.servlet.http.HttpServletRequest request) throws ExternalAuthenticationException
request - servlet requestfinishExternalAuthentication(java.lang.String, HttpServletRequest, HttpServletResponse)ExternalAuthenticationException - if an error occurspublic static void finishExternalAuthentication(@Nonnull@NotEmpty String key, @Nonnull javax.servlet.http.HttpServletRequest request, @Nonnull javax.servlet.http.HttpServletResponse response) throws ExternalAuthenticationException, IOException
key - the value returned by startExternalAuthentication(HttpServletRequest)request - servlet requestresponse - servlet responseExternalAuthenticationException - if an error occursIOException - if the redirect cannot be issued@Nonnull public static ProfileRequestContext getProfileRequestContext(@Nonnull@NotEmpty String key, @Nonnull javax.servlet.http.HttpServletRequest request) throws ExternalAuthenticationException
ProfileRequestContext associated with a request.key - the value returned by startExternalAuthentication(HttpServletRequest)request - servlet requestExternalAuthenticationException - if an error occursprotected void doStart(@Nonnull javax.servlet.http.HttpServletRequest request) throws ExternalAuthenticationException
request - servlet requestExternalAuthenticationException - if an error occursprotected void doFinish(@Nonnull javax.servlet.http.HttpServletRequest request, @Nonnull javax.servlet.http.HttpServletResponse response) throws ExternalAuthenticationException, IOException
request - servlet requestresponse - servlet responseExternalAuthenticationException - if an error occursIOException - if the redirect cannot be issued@Nonnull protected ProfileRequestContext getProfileRequestContext(@Nonnull javax.servlet.http.HttpServletRequest request) throws ExternalAuthenticationException
ProfileRequestContext associated with a request.request - servlet requestExternalAuthenticationException - if an error occursCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.