public class Auth extends Object
| Constructor and Description |
|---|
Auth()
Initializes the SP SAML instance.
|
Auth(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Initializes the SP SAML instance.
|
Auth(KeyStoreSettings keyStoreSetting)
Initializes the SP SAML instance.
|
Auth(KeyStoreSettings keyStoreSetting,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Initializes the SP SAML instance.
|
Auth(Saml2Settings settings,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Initializes the SP SAML instance.
|
Auth(String filename)
Initializes the SP SAML instance.
|
Auth(String filename,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Initializes the SP SAML instance.
|
Auth(String filename,
KeyStoreSettings keyStoreSetting)
Initializes the SP SAML instance.
|
Auth(String filename,
KeyStoreSettings keyStoreSetting,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Initializes the SP SAML instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildRequestSignature(String samlRequest,
String relayState,
String signAlgorithm)
Generates the Signature for a SAML Request
|
String |
buildResponseSignature(String samlResponse,
String relayState,
String signAlgorithm)
Generates the Signature for a SAML Response
|
Collection<String> |
getAttribute(String name) |
Map<String,List<String>> |
getAttributes() |
List<String> |
getAttributesName() |
List<String> |
getErrors() |
String |
getLastAssertionId() |
List<org.joda.time.Instant> |
getLastAssertionNotOnOrAfter() |
String |
getLastErrorReason() |
String |
getLastMessageId() |
Calendar |
getLastMessageIssueInstant()
Returns the issue instant of the last message processed.
|
String |
getLastRequestId() |
Calendar |
getLastRequestIssueInstant()
Returns the issue instant of the last request generated (AuthnRequest or LogoutRequest).
|
String |
getLastRequestXML()
Returns the most recently-constructed/processed XML SAML request
(AuthNRequest, LogoutRequest)
|
String |
getLastResponseXML()
Returns the most recently-constructed/processed XML SAML response
(SAMLResponse, LogoutResponse).
|
Exception |
getLastValidationException() |
String |
getNameId() |
String |
getNameIdFormat() |
String |
getNameIdNameQualifier() |
String |
getNameIdSPNameQualifier() |
org.joda.time.DateTime |
getSessionExpiration() |
String |
getSessionIndex() |
Saml2Settings |
getSettings() |
String |
getSLOResponseUrl() |
String |
getSLOurl() |
String |
getSSOurl() |
boolean |
isAuthenticated() |
Boolean |
isDebugActive() |
void |
login()
Initiates the SSO process.
|
void |
login(AuthnRequestParams authnRequestParams)
Initiates the SSO process.
|
void |
login(String relayState)
Initiates the SSO process.
|
void |
login(String relayState,
AuthnRequestParams authnRequestParams)
Initiates the SSO process.
|
String |
login(String relayState,
AuthnRequestParams authnRequestParams,
Boolean stay)
Initiates the SSO process.
|
String |
login(String relayState,
AuthnRequestParams authnRequestParams,
Boolean stay,
Map<String,String> parameters)
Initiates the SSO process.
|
void |
login(String relayState,
Boolean forceAuthn,
Boolean isPassive,
Boolean setNameIdPolicy)
Deprecated.
|
String |
login(String relayState,
Boolean forceAuthn,
Boolean isPassive,
Boolean setNameIdPolicy,
Boolean stay)
Deprecated.
|
String |
login(String relayState,
Boolean forceAuthn,
Boolean isPassive,
Boolean setNameIdPolicy,
Boolean stay,
String nameIdValueReq)
Deprecated.
|
String |
login(String relayState,
Boolean forceAuthn,
Boolean isPassive,
Boolean setNameIdPolicy,
Boolean stay,
String nameIdValueReq,
Map<String,String> parameters)
Deprecated.
|
void |
logout()
Initiates the SLO process.
|
void |
logout(String relayState)
Initiates the SLO process.
|
void |
logout(String relayState,
LogoutRequestParams logoutRequestParams)
Initiates the SLO process.
|
String |
logout(String relayState,
LogoutRequestParams logoutRequestParams,
Boolean stay)
Initiates the SLO process.
|
String |
logout(String relayState,
LogoutRequestParams logoutRequestParams,
Boolean stay,
Map<String,String> parameters)
Initiates the SLO process.
|
void |
logout(String relayState,
String nameId,
String sessionIndex)
Deprecated.
|
String |
logout(String relayState,
String nameId,
String sessionIndex,
Boolean stay)
Deprecated.
|
String |
logout(String relayState,
String nameId,
String sessionIndex,
Boolean stay,
String nameidFormat)
Deprecated.
|
String |
logout(String relayState,
String nameId,
String sessionIndex,
Boolean stay,
String nameidFormat,
String nameIdNameQualifier)
Deprecated.
|
String |
logout(String relayState,
String nameId,
String sessionIndex,
Boolean stay,
String nameidFormat,
String nameIdNameQualifier,
String nameIdSPNameQualifier)
|
String |
logout(String relayState,
String nameId,
String sessionIndex,
Boolean stay,
String nameidFormat,
String nameIdNameQualifier,
String nameIdSPNameQualifier,
Map<String,String> parameters)
|
void |
logout(String relayState,
String nameId,
String sessionIndex,
String nameidFormat)
Deprecated.
|
void |
logout(String relayState,
String nameId,
String sessionIndex,
String nameidFormat,
String nameIdNameQualifier)
Deprecated.
|
void |
logout(String relayState,
String nameId,
String sessionIndex,
String nameidFormat,
String nameIdNameQualifier,
String nameIdSPNameQualifier)
Deprecated.
|
void |
processResponse()
Process the SAML Response sent by the IdP.
|
void |
processResponse(String requestId)
Process the SAML Response sent by the IdP.
|
void |
processSLO()
Process the SAML Logout Response / Logout Request sent by the IdP.
|
void |
processSLO(Boolean keepLocalSession,
String requestId)
Process the SAML Logout Response / Logout Request sent by the IdP.
|
String |
processSLO(Boolean keepLocalSession,
String requestId,
Boolean stay)
Process the SAML Logout Response / Logout Request sent by the IdP.
|
void |
setStrict(Boolean value)
Set the strict mode active/disable
|
public Auth()
throws IOException,
SettingsException,
Error
IOExceptionSettingsExceptionErrorpublic Auth(KeyStoreSettings keyStoreSetting) throws IOException, SettingsException, Error
keyStoreSetting - KeyStoreSettings is a KeyStore which have the Private/Public keysIOExceptionSettingsExceptionErrorpublic Auth(String filename) throws IOException, SettingsException, Error
filename - String Filename with the settingsIOExceptionSettingsExceptionErrorpublic Auth(String filename, KeyStoreSettings keyStoreSetting) throws IOException, SettingsException, Error
filename - String Filename with the settingskeyStoreSetting - KeyStoreSettings is a KeyStore which have the Private/Public keysIOExceptionSettingsExceptionErrorpublic Auth(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
SettingsException,
Error
request - HttpServletRequest object to be processedresponse - HttpServletResponse object to be usedIOExceptionSettingsExceptionErrorpublic Auth(KeyStoreSettings keyStoreSetting, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, SettingsException, Error
keyStoreSetting - KeyStoreSettings is a KeyStore which have the Private/Public keysrequest - HttpServletRequest object to be processedresponse - HttpServletResponse object to be usedIOExceptionSettingsExceptionErrorpublic Auth(String filename, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SettingsException, IOException, Error
filename - String Filename with the settingsrequest - HttpServletRequest object to be processedresponse - HttpServletResponse object to be usedSettingsExceptionIOExceptionErrorpublic Auth(String filename, KeyStoreSettings keyStoreSetting, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SettingsException, IOException, Error
filename - String Filename with the settingskeyStoreSetting - KeyStoreSettings is a KeyStore which have the Private/Public keysrequest - HttpServletRequest object to be processedresponse - HttpServletResponse object to be usedSettingsExceptionIOExceptionErrorpublic Auth(Saml2Settings settings, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SettingsException
settings - Saml2Settings object. Setting datarequest - HttpServletRequest object to be processedresponse - HttpServletResponse object to be usedSettingsExceptionpublic void setStrict(Boolean value)
value - Strict value@Deprecated public String login(String relayState, Boolean forceAuthn, Boolean isPassive, Boolean setNameIdPolicy, Boolean stay, String nameIdValueReq) throws IOException, SettingsException
login(String, AuthnRequestParams, Boolean) with
AuthnRequestParams.AuthnRequestParams(boolean, boolean, boolean, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the authenticated user should be
redirected after the authentication response has been received
back from the Identity Provider and validated correctly with
processResponse(); please note that SAML 2.0
specification imposes a limit of max 80 characters for this
relayState data and that protection strategies against tampering
should better be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedforceAuthn - When true the AuthNRequest will set the ForceAuthn='true'isPassive - When true the AuthNRequest will set the IsPassive='true'setNameIdPolicy - When true the AuthNRequest will set a nameIdPolicystay - True if we want to stay (returns the url string) False to
execute redirectionnameIdValueReq - Indicates to the IdP the subject that should be authenticatedIOExceptionSettingsException@Deprecated public String login(String relayState, Boolean forceAuthn, Boolean isPassive, Boolean setNameIdPolicy, Boolean stay, String nameIdValueReq, Map<String,String> parameters) throws IOException, SettingsException
login(String, AuthnRequestParams, Boolean, Map) with
AuthnRequestParams.AuthnRequestParams(boolean, boolean, boolean, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the authenticated user should be
redirected after the authentication response has been received
back from the Identity Provider and validated correctly with
processResponse(); please note that SAML 2.0
specification imposes a limit of max 80 characters for this
relayState data and that protection strategies against tampering
should better be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedforceAuthn - When true the AuthNRequest will set the ForceAuthn='true'isPassive - When true the AuthNRequest will set the IsPassive='true'setNameIdPolicy - When true the AuthNRequest will set a nameIdPolicystay - True if we want to stay (returns the url string) False to
execute redirectionnameIdValueReq - Indicates to the IdP the subject that should be authenticatedparameters - Use it to send extra parameters in addition to the AuthNRequestIOExceptionSettingsException@Deprecated public String login(String relayState, Boolean forceAuthn, Boolean isPassive, Boolean setNameIdPolicy, Boolean stay) throws IOException, SettingsException
login(String, AuthnRequestParams, Boolean) with
AuthnRequestParams.AuthnRequestParams(boolean, boolean, boolean)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the authenticated user should be
redirected after the authentication response has been received
back from the Identity Provider and validated correctly with
processResponse(); please note that SAML 2.0
specification imposes a limit of max 80 characters for this
relayState data and that protection strategies against tampering
should better be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedforceAuthn - When true the AuthNRequest will set the ForceAuthn='true'isPassive - When true the AuthNRequest will set the IsPassive='true'setNameIdPolicy - When true the AuthNRequest will set a nameIdPolicystay - True if we want to stay (returns the url string) False to
execute redirectionIOExceptionSettingsException@Deprecated public void login(String relayState, Boolean forceAuthn, Boolean isPassive, Boolean setNameIdPolicy) throws IOException, SettingsException
login(String, AuthnRequestParams) with
AuthnRequestParams.AuthnRequestParams(boolean, boolean, boolean)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the authenticated user should be
redirected after the authentication response has been received
back from the Identity Provider and validated correctly with
processResponse(); please note that SAML 2.0
specification imposes a limit of max 80 characters for this
relayState data and that protection strategies against tampering
should better be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedforceAuthn - When true the AuthNRequest will set the ForceAuthn='true'isPassive - When true the AuthNRequest will set the IsPassive='true'setNameIdPolicy - When true the AuthNRequest will set a nameIdPolicyIOExceptionSettingsExceptionpublic void login()
throws IOException,
SettingsException
IOExceptionSettingsExceptionpublic void login(AuthnRequestParams authnRequestParams) throws IOException, SettingsException
authnRequestParams - the authentication request input parametersIOExceptionSettingsExceptionpublic void login(String relayState) throws IOException, SettingsException
relayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the authenticated user should be
redirected after the authentication response has been received
back from the Identity Provider and validated correctly with
processResponse(); please note that SAML 2.0
specification imposes a limit of max 80 characters for this
relayState data and that protection strategies against tampering
should better be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedIOExceptionSettingsExceptionpublic void login(String relayState, AuthnRequestParams authnRequestParams) throws IOException, SettingsException
relayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the authenticated user should be
redirected after the authentication response has been received
back from the Identity Provider and validated correctly with
processResponse(); please note that SAML 2.0
specification imposes a limit of max 80 characters for this
relayState data and that protection strategies against tampering
should better be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedauthnRequestParams - the authentication request input parametersIOExceptionSettingsExceptionpublic String login(String relayState, AuthnRequestParams authnRequestParams, Boolean stay) throws IOException, SettingsException
relayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the authenticated user should be
redirected after the authentication response has been received
back from the Identity Provider and validated correctly with
processResponse(); please note that SAML 2.0
specification imposes a limit of max 80 characters for this
relayState data and that protection strategies against tampering
should better be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedauthnRequestParams - the authentication request input parametersstay - True if we want to stay (returns the url string) False to
execute redirectionIOExceptionSettingsExceptionpublic String login(String relayState, AuthnRequestParams authnRequestParams, Boolean stay, Map<String,String> parameters) throws IOException, SettingsException
relayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the authenticated user should be
redirected after the authentication response has been received
back from the Identity Provider and validated correctly with
processResponse(); please note that SAML 2.0
specification imposes a limit of max 80 characters for this
relayState data and that protection strategies against tampering
should better be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedauthnRequestParams - the authentication request input parametersstay - True if we want to stay (returns the url string) False to
execute redirectionparameters - Use it to send extra parameters in addition to the AuthNRequestIOExceptionSettingsExceptionpublic String logout(String relayState, LogoutRequestParams logoutRequestParams, Boolean stay) throws IOException, SettingsException
relayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedstay - True if we want to stay (returns the url string) False to
execute redirectionlogoutRequestParams - the logout request input parametersIOExceptionSettingsExceptionpublic void logout(String relayState, LogoutRequestParams logoutRequestParams) throws IOException, SettingsException
relayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedlogoutRequestParams - the logout request input parametersIOExceptionSettingsExceptionpublic String logout(String relayState, String nameId, String sessionIndex, Boolean stay, String nameidFormat, String nameIdNameQualifier, String nameIdSPNameQualifier) throws IOException, SettingsException
logout(String, LogoutRequestParams, Boolean) with
LogoutRequestParams.LogoutRequestParams(String, String, String, String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).stay - True if we want to stay (returns the url string) False to
execute redirectionnameidFormat - The NameID Format that will be set in the LogoutRequest.nameIdNameQualifier - The NameID NameQualifier that will be set in the LogoutRequest.nameIdSPNameQualifier - The NameID SP Name Qualifier that will be set in the
LogoutRequest.IOExceptionSettingsExceptionpublic String logout(String relayState, LogoutRequestParams logoutRequestParams, Boolean stay, Map<String,String> parameters) throws IOException, SettingsException
relayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedlogoutRequestParams - the logout request input parametersstay - True if we want to stay (returns the url string) False to
execute redirectionparameters - Use it to send extra parameters in addition to the LogoutRequestIOExceptionSettingsException@Deprecated public String logout(String relayState, String nameId, String sessionIndex, Boolean stay, String nameidFormat, String nameIdNameQualifier, String nameIdSPNameQualifier, Map<String,String> parameters) throws IOException, SettingsException
logout(String, LogoutRequestParams, Boolean, Map)
with
LogoutRequestParams.LogoutRequestParams(String, String, String, String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).stay - True if we want to stay (returns the url string) False to
execute redirectionnameidFormat - The NameID Format that will be set in the LogoutRequest.nameIdNameQualifier - The NameID NameQualifier that will be set in the LogoutRequest.nameIdSPNameQualifier - The NameID SP Name Qualifier that will be set in the
LogoutRequest.parameters - Use it to send extra parameters in addition to the LogoutRequestIOExceptionSettingsException@Deprecated public String logout(String relayState, String nameId, String sessionIndex, Boolean stay, String nameidFormat, String nameIdNameQualifier) throws IOException, SettingsException
logout(String, LogoutRequestParams, Boolean) with
LogoutRequestParams.LogoutRequestParams(String, String, String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).stay - True if we want to stay (returns the url string) False to
execute redirectionnameidFormat - The NameID Format will be set in the LogoutRequest.nameIdNameQualifier - The NameID NameQualifier will be set in the LogoutRequest.IOExceptionSettingsException@Deprecated public String logout(String relayState, String nameId, String sessionIndex, Boolean stay, String nameidFormat) throws IOException, SettingsException
logout(String, LogoutRequestParams, Boolean) with
LogoutRequestParams.LogoutRequestParams(String, String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).stay - True if we want to stay (returns the url string) False to
execute redirectionnameidFormat - The NameID Format will be set in the LogoutRequest.IOExceptionSettingsException@Deprecated public String logout(String relayState, String nameId, String sessionIndex, Boolean stay) throws IOException, SettingsException
logout(String, LogoutRequestParams, Boolean) with
LogoutRequestParams.LogoutRequestParams(String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).stay - True if we want to stay (returns the url string) False to
execute redirectionIOExceptionSettingsException@Deprecated public void logout(String relayState, String nameId, String sessionIndex, String nameidFormat, String nameIdNameQualifier, String nameIdSPNameQualifier) throws IOException, SettingsException
logout(String, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String, String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).nameidFormat - The NameID Format will be set in the LogoutRequest.nameIdNameQualifier - The NameID NameQualifier that will be set in the LogoutRequest.nameIdSPNameQualifier - The NameID SP Name Qualifier that will be set in the
LogoutRequest.IOExceptionSettingsException@Deprecated public void logout(String relayState, String nameId, String sessionIndex, String nameidFormat, String nameIdNameQualifier) throws IOException, SettingsException
logout(String, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).nameidFormat - The NameID Format will be set in the LogoutRequest.nameIdNameQualifier - The NameID NameQualifier will be set in the LogoutRequest.IOExceptionSettingsException@Deprecated public void logout(String relayState, String nameId, String sessionIndex, String nameidFormat) throws IOException, SettingsException
logout(String, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).nameidFormat - The NameID Format will be set in the LogoutRequest.IOExceptionSettingsException@Deprecated public void logout(String relayState, String nameId, String sessionIndex) throws IOException, SettingsException
logout(String, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String)
insteadrelayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providednameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).IOExceptionSettingsExceptionpublic void logout()
throws IOException,
SettingsException
IOExceptionSettingsExceptionpublic void logout(String relayState) throws IOException, SettingsException
relayState - a state information to pass forth and back between the Service
Provider and the Identity Provider; in the most simple case, it
may be a URL to which the logged out user should be redirected
after the logout response has been received back from the
Identity Provider and validated correctly with
processSLO(); please note that SAML 2.0 specification
imposes a limit of max 80 characters for this relayState data
and that protection strategies against tampering should better
be implemented; it will be a self-routed URL when
null, otherwise no relayState at all will be
appended if an empty string is providedIOExceptionSettingsExceptionpublic String getSSOurl()
public String getSLOurl()
public String getSLOResponseUrl()
public void processResponse(String requestId) throws Exception
requestId - The ID of the AuthNRequest sent by this SP to the IdPExceptionpublic void processResponse()
throws Exception
Exceptionpublic String processSLO(Boolean keepLocalSession, String requestId, Boolean stay) throws Exception
keepLocalSession - When true will keep the local session, otherwise will
destroy itrequestId - The ID of the LogoutRequest sent by this SP to the
IdPstay - True if we want to stay (returns the url string) False
to execute redirectionExceptionpublic void processSLO(Boolean keepLocalSession, String requestId) throws Exception
keepLocalSession - When true will keep the local session, otherwise will
destroy itrequestId - The ID of the LogoutRequest sent by this SP to the
IdPExceptionpublic void processSLO()
throws Exception
Exceptionpublic final boolean isAuthenticated()
public final List<String> getAttributesName()
public final Map<String,List<String>> getAttributes()
public final Collection<String> getAttribute(String name)
name - Name of the attributepublic final String getNameId()
public final String getNameIdFormat()
public final String getNameIdNameQualifier()
public final String getNameIdSPNameQualifier()
public final String getSessionIndex()
public final org.joda.time.DateTime getSessionExpiration()
public String getLastMessageId()
public Calendar getLastMessageIssueInstant()
public String getLastAssertionId()
public List<org.joda.time.Instant> getLastAssertionNotOnOrAfter()
public List<String> getErrors()
public String getLastErrorReason()
public Exception getLastValidationException()
public String getLastRequestId()
public Calendar getLastRequestIssueInstant()
null if nonepublic Saml2Settings getSettings()
public Boolean isDebugActive()
public String buildRequestSignature(String samlRequest, String relayState, String signAlgorithm) throws SettingsException
samlRequest - The SAML RequestrelayState - The RelayStatesignAlgorithm - Signature algorithm methodSettingsExceptionpublic String buildResponseSignature(String samlResponse, String relayState, String signAlgorithm) throws SettingsException
samlResponse - The SAML ResponserelayState - The RelayStatesignAlgorithm - Signature algorithm methodSettingsExceptionpublic String getLastRequestXML()
public String getLastResponseXML()
Copyright © 2021. All rights reserved.