Class AuthenticationReply


  • public class AuthenticationReply
    extends java.lang.Object
    This class holds information of the outcome of the authentication.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int AUTHENTICATED
      The return code if the user was authenticated.
      static int CHALLENGE
      The return code if the user was challenged.
      static int NEW_USERNAME
      Return code if reauthenticating and username has changed
      static int NOT_AUTHENTICATED
      The return code if the user wasn't authenticated.
      static int NOT_AVAILABLE_SERVICE
      Return code if a malfunction or misconfiguration occurred.
      static java.lang.String[] REPLY_TEXT
      Reply messages for the different return codes.
      static int TYPE_CERTIFICATE
      A constant for the type certificate.
      static java.lang.String TYPE_CERTIFICATE_NAME
      A constant for the type certificate as a string.
      static int TYPE_TEMPLATE
      A constant for the type template.
      static java.lang.String TYPE_TEMPLATE_NAME
      A constant for the type template as a string.
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthenticationReply​(int response)
      Constructs a new AuthenticationReply instance with the specified return code.
      AuthenticationReply​(int response, AuthenticationParameters parameters, java.lang.String template)
      Constructs a new AuthenticationReply instance with the specified return code, parameters, and template.
      AuthenticationReply​(int response, java.lang.String caName)
      Constructs a new AuthenticationReply instance with the specified return code and CA name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AuthenticationAttributes getAttributes()
      Returns the authentication attributes.
      java.lang.String getCAName()
      Returns the name of the Certificate Authority.
      java.util.List<java.lang.String> getCANames()
      Returns the list of Certificate Authority names.
      byte[] getCertificate()
      Returns the certificate.
      java.lang.String getDisplayName()
      Returns the display name.
      int getId()
      Returns the authentication method ID.
      AuthenticationParameters getParameters()
      Returns the authentication parameters.
      int getReply()
      Returns the return code.
      java.lang.String getReplyMessage()
      Returns the Reply Message, which is set by the Authentication Method to propagate any message to the accounting service.
      java.lang.String getReplyString()
      Returns a reply message for the return code set in this object.
      java.lang.String getSessionId()
      Returns the session ID.
      java.lang.String getTemplate()
      Returns the template.
      int getType()
      Returns the type.
      java.lang.String getUserid()
      Returns the user ID.
      boolean isPoll()
      Getter to check if this was a poll-request.
      boolean isXpiReply()
      True if this is a auth-resp to a XPI auth-req
      void setAttributes​(AuthenticationAttributes attributes)
      Sets the authentication attributes.
      void setCAName​(java.lang.String caName)
      Sets the name of the Certificate Authority.
      void setCANames​(java.util.List<java.lang.String> caNames)
      Sets the list of Certificate Authority names.
      void setDisplayName​(java.lang.String displayName)
      Sets the display name.
      void setId​(int authenticationMethodId)
      Sets the authentication method ID.
      void setIsXpiReply​(boolean mIsXpiReply)
      Set isXPI flag if this is a auth-resp to a auth-req initiated through XPI
      void setParameters​(AuthenticationParameters parameters)
      Sets the authentication parameters.
      void setPoll​(boolean value)
      Setter for poll-requests.
      void setReply​(int reply)
      Sets the return code.
      void setReplyMessage​(java.lang.String message)
      Sets the Reply Message, which is set by the Authentication Method to propagate any message to the accounting service.
      void setSessionId​(java.lang.String sessionId)
      Sets the session ID.
      void setTemplate​(java.lang.String template)
      Sets the template.
      void setUserid​(java.lang.String userId)
      Sets the user ID.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • AUTHENTICATED

        public static final int AUTHENTICATED
        The return code if the user was authenticated.
        See Also:
        Constant Field Values
      • NOT_AUTHENTICATED

        public static final int NOT_AUTHENTICATED
        The return code if the user wasn't authenticated.
        See Also:
        Constant Field Values
      • CHALLENGE

        public static final int CHALLENGE
        The return code if the user was challenged.
        See Also:
        Constant Field Values
      • NOT_AVAILABLE_SERVICE

        public static final int NOT_AVAILABLE_SERVICE
        Return code if a malfunction or misconfiguration occurred.
        See Also:
        Constant Field Values
      • NEW_USERNAME

        public static final int NEW_USERNAME
        Return code if reauthenticating and username has changed
        See Also:
        Constant Field Values
      • TYPE_TEMPLATE

        public static final int TYPE_TEMPLATE
        A constant for the type template.
        See Also:
        Constant Field Values
      • TYPE_CERTIFICATE

        public static final int TYPE_CERTIFICATE
        A constant for the type certificate.
        See Also:
        Constant Field Values
      • TYPE_TEMPLATE_NAME

        public static final java.lang.String TYPE_TEMPLATE_NAME
        A constant for the type template as a string.
        See Also:
        Constant Field Values
      • TYPE_CERTIFICATE_NAME

        public static final java.lang.String TYPE_CERTIFICATE_NAME
        A constant for the type certificate as a string.
        See Also:
        Constant Field Values
      • REPLY_TEXT

        public static final java.lang.String[] REPLY_TEXT
        Reply messages for the different return codes.
    • Method Detail

      • getReplyString

        public java.lang.String getReplyString()
        Returns a reply message for the return code set in this object.
        Returns:
        A reply message for the return code.
      • getParameters

        public AuthenticationParameters getParameters()
        Returns the authentication parameters.
        Returns:
        The authentication parameters.
      • setParameters

        public void setParameters​(AuthenticationParameters parameters)
        Sets the authentication parameters.
        Parameters:
        parameters - The authentication parameters.
      • getAttributes

        public AuthenticationAttributes getAttributes()
        Returns the authentication attributes.
        Returns:
        The authentication attributes.
      • setAttributes

        public void setAttributes​(AuthenticationAttributes attributes)
        Sets the authentication attributes.
        Parameters:
        attributes - The authentication attributes.
      • getCertificate

        public byte[] getCertificate()
        Returns the certificate.
        Returns:
        The certificate.
      • getCAName

        public java.lang.String getCAName()
        Returns the name of the Certificate Authority.
        Returns:
        The name of the Certificate Authority.
      • setCAName

        public void setCAName​(java.lang.String caName)
        Sets the name of the Certificate Authority.
        Parameters:
        caName - The name of the Certificate Authority.
      • getCANames

        public java.util.List<java.lang.String> getCANames()
        Returns the list of Certificate Authority names.
        Returns:
        The list of Certificate Authority names.
      • setCANames

        public void setCANames​(java.util.List<java.lang.String> caNames)
        Sets the list of Certificate Authority names.
        Parameters:
        caNames - The list of Certificate Authority names.
      • getTemplate

        public java.lang.String getTemplate()
        Returns the template.
        Returns:
        The template.
      • setTemplate

        public void setTemplate​(java.lang.String template)
        Sets the template.
        Parameters:
        template - The template.
      • getUserid

        public java.lang.String getUserid()
        Returns the user ID.
        Returns:
        The user ID.
      • setUserid

        public void setUserid​(java.lang.String userId)
        Sets the user ID.
        Parameters:
        userId - The user ID.
      • getSessionId

        public java.lang.String getSessionId()
        Returns the session ID.
        Returns:
        The session ID.
      • setSessionId

        public void setSessionId​(java.lang.String sessionId)
        Sets the session ID.
        Parameters:
        sessionId - The session ID.
      • getDisplayName

        public java.lang.String getDisplayName()
        Returns the display name.
        Returns:
        The display name.
      • setDisplayName

        public void setDisplayName​(java.lang.String displayName)
        Sets the display name.
        Parameters:
        displayName - The display name.
      • getId

        public int getId()
        Returns the authentication method ID.
        Returns:
        The authentication method ID.
      • setId

        public void setId​(int authenticationMethodId)
        Sets the authentication method ID.
        Parameters:
        authenticationMethodId - The authentication method ID.
      • getReplyMessage

        public java.lang.String getReplyMessage()
        Returns the Reply Message, which is set by the Authentication Method to propagate any message to the accounting service.
        Returns:
        The reply message, may be null.
      • setReplyMessage

        public void setReplyMessage​(java.lang.String message)
        Sets the Reply Message, which is set by the Authentication Method to propagate any message to the accounting service.
        Parameters:
        message - The reply message to set.
      • setPoll

        public void setPoll​(boolean value)
        Setter for poll-requests.
        Parameters:
        value -
      • isPoll

        public boolean isPoll()
        Getter to check if this was a poll-request.
        Returns:
        true if poll-request.
      • isXpiReply

        public boolean isXpiReply()
        True if this is a auth-resp to a XPI auth-req
        Parameters:
        mIsXpiReply -
      • setIsXpiReply

        public void setIsXpiReply​(boolean mIsXpiReply)
        Set isXPI flag if this is a auth-resp to a auth-req initiated through XPI
        Parameters:
        mIsXpiReply -
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object