Class Password

  • All Implemented Interfaces:
    Named

    public final class Password
    extends Object
    implements Named
    Immutable password class. Represents a http credentials password. See RFC 2617: HTTP Authentication: Basic and Digest Access Authentication
    • Constructor Detail

      • Password

        public Password​(String name,
                        String comments,
                        String passwordDomain,
                        String realm,
                        String username,
                        String password)
        Create a new password object with the given information.
        Parameters:
        name - The name of the Password
        comments - Any comments
        passwordDomain - the domain where this Password is used
        realm - the realm of the Password
        username - the username
        password - the password
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Named
        Get the name of this object.
        Specified by:
        getName in interface Named
        Returns:
        the name of the Password
      • getComments

        public String getComments()
        Description copied from interface: Named
        Get the comment of this object.
        Specified by:
        getComments in interface Named
        Returns:
        the comments for the Password
      • getPasswordDomain

        public String getPasswordDomain()
        Returns:
        the domain for the Password
      • getRealm

        public String getRealm()
        Returns:
        the Realm for the Password
      • getUsername

        public String getUsername()
        Returns:
        the username.
      • getPassword

        public String getPassword()
        Returns:
        the password.
      • equals

        public boolean equals​(Object o)
        equals method overriding Object#equals. Autogenerated code.
        Overrides:
        equals in class Object
        Parameters:
        o - The object to compare with
        Returns:
        Whether they are equal
      • hashCode

        public int hashCode()
        hashCode method overriding Object#hashCode. Autogenerated code.
        Overrides:
        hashCode in class Object
        Returns:
        hashcode