Class AuthenticationParameters


  • public class AuthenticationParameters
    extends java.lang.Object
    This class holds the various challenge parameters that authentication methods uses to challenge the user for, e.g. username and password.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addParameter​(java.lang.String key, byte[] value)
      Adds a parameter to the list of parameters.
      byte[] getParameter​(java.lang.String key)
      Returns the parameter value for a key.
      java.lang.String getUsername()  
      java.util.Set<java.lang.String> keySet()
      Returns a set view of the parameter keys.
      int size()
      Returns the number of parameters.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • AuthenticationParameters

        public AuthenticationParameters()
    • Method Detail

      • addParameter

        public void addParameter​(java.lang.String key,
                                 byte[] value)
        Adds a parameter to the list of parameters. If the key is null, then nothing is added. If the value is null, then an empty byte array is added. The internal data structure is a Map, i.e. old key-value pairs will be replaced when keys match. Keys are internally handled case-insensitively, i.e. keys "TheKey" and "thekey" will be treated as the same key.
        Parameters:
        key - The key as a string. The key is case-insensitive.
        value - The byte array value.
      • getParameter

        public byte[] getParameter​(java.lang.String key)
        Returns the parameter value for a key.
        Parameters:
        key - The key as a string.
        Returns:
        A byte array holding the value if it exists, otherwise null.
      • size

        public int size()
        Returns the number of parameters.
        Returns:
        The number of parameters.
      • keySet

        public java.util.Set<java.lang.String> keySet()
        Returns a set view of the parameter keys.
        Returns:
        A set view of the parameter keys.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • getUsername

        public java.lang.String getUsername()