Class AuthnRequestParams

java.lang.Object
com.onelogin.saml2.authn.AuthnRequestParams

public class AuthnRequestParams extends Object
Input parameters for a SAML 2 authentication request.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
    When true and setNameIdPolicy is also true, then the AllowCreate='true' will be set on the NameIDPolicy element
    private final boolean
    When true the AuthNRequest will set the ForceAuthn='true'
    private final boolean
    When true the AuthNRequest will set the IsPassive='true'
    private final String
    Indicates to the IdP the subject that should be authenticated
    private final boolean
    When true the AuthNRequest will set a nameIdPolicy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    AuthnRequestParams(boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy)
    Create a set of authentication request input parameters.
     
    AuthnRequestParams(boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy, boolean allowCreate)
    Create a set of authentication request input parameters.
     
    AuthnRequestParams(boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy, boolean allowCreate, String nameIdValueReq)
    Create a set of authentication request input parameters.
     
    AuthnRequestParams(boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy, String nameIdValueReq)
    Create a set of authentication request input parameters.
    protected
    Create a set of authentication request input parameters, by copying them from another set.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • forceAuthn

      private final boolean forceAuthn
      When true the AuthNRequest will set the ForceAuthn='true'
    • isPassive

      private final boolean isPassive
      When true the AuthNRequest will set the IsPassive='true'
    • setNameIdPolicy

      private final boolean setNameIdPolicy
      When true the AuthNRequest will set a nameIdPolicy
    • allowCreate

      private final boolean allowCreate
      When true and setNameIdPolicy is also true, then the AllowCreate='true' will be set on the NameIDPolicy element
    • nameIdValueReq

      private final String nameIdValueReq
      Indicates to the IdP the subject that should be authenticated
  • Constructor Details

    • AuthnRequestParams

      public AuthnRequestParams(boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy)
      Create a set of authentication request input parameters.
      Parameters:
      forceAuthn - whether the ForceAuthn attribute should be set to true
      isPassive - whether the IsPassive attribute should be set to true
      setNameIdPolicy - whether a NameIDPolicy should be set
    • AuthnRequestParams

      public AuthnRequestParams(boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy, boolean allowCreate)
      Create a set of authentication request input parameters.
      Parameters:
      forceAuthn - whether the ForceAuthn attribute should be set to true
      isPassive - whether the IsPassive attribute should be set to true
      setNameIdPolicy - whether a NameIDPolicy should be set
      allowCreate - whether the AllowCreate attribute should be set to true on the NameIDPolicy element; only meaningful if setNameIdPolicy is also true
    • AuthnRequestParams

      public AuthnRequestParams(boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy, String nameIdValueReq)
      Create a set of authentication request input parameters.
      Parameters:
      forceAuthn - whether the ForceAuthn attribute should be set to true
      isPassive - whether the IsPassive attribute should be set to true
      setNameIdPolicy - whether a NameIDPolicy should be set
      nameIdValueReq - the subject that should be authenticated
    • AuthnRequestParams

      public AuthnRequestParams(boolean forceAuthn, boolean isPassive, boolean setNameIdPolicy, boolean allowCreate, String nameIdValueReq)
      Create a set of authentication request input parameters.
      Parameters:
      forceAuthn - whether the ForceAuthn attribute should be set to true
      isPassive - whether the IsPassive attribute should be set to true
      setNameIdPolicy - whether a NameIDPolicy should be set
      allowCreate - the value to set for the allowCreate attribute of NameIDPolicy element; null means it's not set at all; only meaningful when setNameIdPolicy is true
      nameIdValueReq - the subject that should be authenticated
    • AuthnRequestParams

      protected AuthnRequestParams(AuthnRequestParams source)
      Create a set of authentication request input parameters, by copying them from another set.
      Parameters:
      source - the source set of authentication request input parameters
  • Method Details

    • isForceAuthn

      public boolean isForceAuthn()
      Returns:
      whether the ForceAuthn attribute should be set to true
    • isPassive

      public boolean isPassive()
      Returns:
      whether the IsPassive attribute should be set to true
    • isSetNameIdPolicy

      public boolean isSetNameIdPolicy()
      Returns:
      whether a NameIDPolicy should be set
    • isAllowCreate

      public boolean isAllowCreate()
      Returns:
      whether the AllowCreate attribute should be set to true on the NameIDPolicy element (only meaningful if isSetNameIdPolicy() is also true)
    • getNameIdValueReq

      public String getNameIdValueReq()
      Returns:
      the subject that should be authenticated