public class Saml2LoginContext extends LoginContext implements Serializable
LoginContext.
This class can interpret RequestedAuthnContext and act accordingly.| Modifier and Type | Field and Description |
|---|---|
private AuthnRequest |
authnRequest
The authentication request.
|
private String |
relayState
Relay state from authentication request.
|
private boolean |
requestAuthenticated
Was the request authenticated when received.
|
private String |
serialAuthnRequest
Serialized authentication request.
|
private static long |
serialVersionUID
Serial version UID.
|
private boolean |
unsolicited
Unsolicited SSO indicator.
|
LOGIN_CONTEXT_KEY| Constructor and Description |
|---|
Saml2LoginContext(String relyingParty,
String state,
AuthnRequest request)
Creates a new instance of Saml2LoginContext.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
extractRequestedAuthenticationMethods(AuthnRequest request)
Extracts the authentication methods requested within the request.
|
String |
getAuthenticationRequest()
Gets the serialized authentication request that started the login process.
|
AuthnRequest |
getAuthenticiationRequestXmlObject()
Gets the authentication request object.
|
String |
getRelayState()
Gets the relay state from the originating authentication request.
|
boolean |
isRequestAuthenticated()
Gets whether the message was authenticated when received.
|
boolean |
isUnsolicited()
Returns the unsolicited SSO indicator.
|
protected String |
serializeRequest(AuthnRequest request)
Serializes an authentication request into a string.
|
void |
setRequestAuthenticated(boolean flag)
Sets whether the message was authenticated when received.
|
void |
setUnsolicited(boolean isUnsolicited)
Sets the unsolicited SSO indicator.
|
getAttemptedAuthnMethod, getAuthenticationAttempted, getAuthenticationDuration, getAuthenticationEngineURL, getAuthenticationFailure, getAuthenticationInstant, getAuthenticationMethod, getAuthenticationMethodInformation, getDefaultAuthenticationMethod, getPrincipalName, getProfileHandlerURL, getProperty, getRelyingPartyId, getRequestedAuthenticationMethods, getSessionID, isForceAuthRequired, isPassiveAuthRequired, isPrincipalAuthenticated, setAttemptedAuthnMethod, setAuthenticationAttempted, setAuthenticationDuration, setAuthenticationEngineURL, setAuthenticationFailure, setAuthenticationInstant, setAuthenticationMethod, setAuthenticationMethodInformation, setDefaultAuthenticationMethod, setForceAuthRequired, setPassiveAuthRequired, setPrincipalAuthenticated, setPrincipalName, setProfileHandlerURL, setProperty, setRelyingParty, setSessionIDprivate static final long serialVersionUID
private String relayState
private transient AuthnRequest authnRequest
private String serialAuthnRequest
private boolean requestAuthenticated
private boolean unsolicited
public Saml2LoginContext(String relyingParty, String state, AuthnRequest request) throws MarshallingException
relyingParty - entity ID of the relying partystate - relay state from incoming authentication requestrequest - SAML 2.0 Authentication RequestMarshallingException - thrown if the given request can not be marshalled and serialized into a stringpublic AuthnRequest getAuthenticiationRequestXmlObject() throws UnmarshallingException
UnmarshallingException - thrown if there is a problem unmarshalling the serialized form of the requestpublic String getAuthenticationRequest() throws UnmarshallingException
UnmarshallingException - thrown if the serialized form on the authentication request can be unmarshalledpublic String getRelayState()
public boolean isUnsolicited()
public void setUnsolicited(boolean isUnsolicited)
isUnsolicited - unsolicited SSO indicator to setpublic boolean isRequestAuthenticated()
public void setRequestAuthenticated(boolean flag)
flag - whether the message was authenticated when receivedprotected String serializeRequest(AuthnRequest request) throws MarshallingException
request - the request to serializeMarshallingException - thrown if the request can not be marshalled and serializedprotected List<String> extractRequestedAuthenticationMethods(AuthnRequest request)
request - the authentication requestCopyright © 1999-2014. All Rights Reserved.