Class PrincipalSid

  • All Implemented Interfaces:
    java.io.Serializable, Sid

    public class PrincipalSid
    extends java.lang.Object
    implements Sid
    Represents an Authentication.getPrincipal() as a Sid.

    This is a basic implementation that simply uses the String-based principal for Sid comparison. More complex principal objects may wish to provide an alternative Sid implementation that uses some other identifier.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)
      Refer to the java.lang.Object documentation for the interface contract.
      java.lang.String getPrincipal()  
      int hashCode()
      Refer to the java.lang.Object documentation for the interface contract.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PrincipalSid

        public PrincipalSid​(java.lang.String principal)
      • PrincipalSid

        public PrincipalSid​(Authentication authentication)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object object)
        Description copied from interface: Sid
        Refer to the java.lang.Object documentation for the interface contract.
        Specified by:
        equals in interface Sid
        Overrides:
        equals in class java.lang.Object
        Parameters:
        object - to be compared
        Returns:
        true if the objects are equal, false otherwise
      • hashCode

        public int hashCode()
        Description copied from interface: Sid
        Refer to the java.lang.Object documentation for the interface contract.
        Specified by:
        hashCode in interface Sid
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code representation of this object
      • getPrincipal

        public java.lang.String getPrincipal()
      • toString

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