java.lang.Object
org.codelibs.saml2.core.authn.AuthnRequest
AuthNRequest class of Java Toolkit.
A class that implements SAML 2 Authentication Request
-
Constructor Summary
ConstructorsConstructorDescriptionAuthnRequest(Saml2Settings settings) Constructs the AuthnRequest object.AuthnRequest(Saml2Settings settings, boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy) Deprecated.AuthnRequest(Saml2Settings settings, boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy, String nameIdValueReq) Deprecated.AuthnRequest(Saml2Settings settings, AuthnRequestParams params) Constructs the AuthnRequest object. -
Method Summary
Modifier and TypeMethodDescriptiongetEncodedAuthnRequest(Boolean deflated) getId()Returns the issue instant of this message.protected StringpostProcessXml(String authnRequestXml, AuthnRequestParams params, Saml2Settings settings) Allows for an extension class to post-process the AuthnRequest XML generated for this request, in order to customize the result.
-
Constructor Details
-
AuthnRequest
Constructs the AuthnRequest object.- Parameters:
settings- OneLogin_Saml2_Settings- See Also:
-
AuthnRequest
@Deprecated public AuthnRequest(Saml2Settings settings, boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy, String nameIdValueReq) Deprecated.Constructs the AuthnRequest object.- Parameters:
settings- OneLogin_Saml2_SettingsforceAuthn- When true the AuthNReuqest will set the ForceAuthn='true'isPassive- When true the AuthNReuqest will set the IsPassive='true'setNameIdPolicy- When true the AuthNReuqest will set a nameIdPolicynameIdValueReq- Indicates to the IdP the subject that should be authenticated
-
AuthnRequest
@Deprecated public AuthnRequest(Saml2Settings settings, boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy) Deprecated.Constructs the AuthnRequest object.- Parameters:
settings- OneLogin_Saml2_SettingsforceAuthn- When true the AuthNReuqest will set the ForceAuthn='true'isPassive- When true the AuthNReuqest will set the IsPassive='true'setNameIdPolicy- When true the AuthNReuqest will set a nameIdPolicy
-
AuthnRequest
Constructs the AuthnRequest object.- Parameters:
settings- OneLogin_Saml2_Settingsparams- a set of authentication request input parameters that shape the request to create
-
-
Method Details
-
postProcessXml
protected String postProcessXml(String authnRequestXml, AuthnRequestParams params, Saml2Settings settings) Allows for an extension class to post-process the AuthnRequest XML generated for this request, in order to customize the result.This method is invoked at construction time, after all the other fields of this class have already been initialised. Its default implementation simply returns the input XML as-is, with no change.
- Parameters:
authnRequestXml- the XML produced for this AuthnRequest by the standard implementation provided byAuthnRequestparams- the authentication request input parameterssettings- the settings- Returns:
- the post-processed XML for this AuthnRequest, which will then be
returned by any call to
getAuthnRequestXml()
-
getEncodedAuthnRequest
- Parameters:
deflated- If deflated or not the encoded AuthnRequest- Returns:
- the base64 encoded unsigned AuthnRequest (deflated or not)
-
getEncodedAuthnRequest
- Returns:
- base64 encoded, unsigned AuthnRequest (deflated or not)
-
getAuthnRequestXml
- Returns:
- unsigned plain-text AuthnRequest.
-
getId
- Returns:
- the generated id of the AuthnRequest message
-
getIssueInstant
Returns the issue instant of this message.- Returns:
- a new
Calendarinstance carrying the issue instant of this message
-
AuthnRequest(Saml2Settings, AuthnRequestParams)withAuthnRequestParams(boolean, boolean, boolean)instead