com.ibm.security.auth

Class JAASPrincipal

  • java.lang.Object
    • com.ibm.security.auth.JAASPrincipal
  • All Implemented Interfaces:
    java.io.Serializable, java.security.Principal
    Direct Known Subclasses:
    DomainIDPrincipal, DomainPrincipal, GroupIDPrincipal, PrimaryGroupIDPrincipal, ServerPrincipal, UserIDPrincipal, UsernamePrincipal, WkstationPrincipal


    public class JAASPrincipal
    extends java.lang.Object
    implements java.security.Principal, java.io.Serializable

    This class implements the Principal interface and represents general information about a user, group or domain.

    Principals such as this JAASPrincipal may be associated with a particular Subject to augment that Subject with an additional identity. Refer to the Subject class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with a Subject.

    See Also:
    Principal, Subject, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      JAASPrincipal(java.lang.String name)
      Create a JAASPrincipal with an identifying name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object o)
      Compares the specified Object with this JAASPrincipal for equality.
      java.lang.String getName()
      Return a string name of this JAASPrincipal.
      int hashCode()
      Return a hash code for this JAASPrincipal.
      java.lang.String toString()
      Return a string representation of this JAASPrincipal.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        implies
    • Constructor Detail

      • JAASPrincipal

        public JAASPrincipal(java.lang.String name)
        Create a JAASPrincipal with an identifying name.

        Parameters:
        name - the identifying name.

        Throws:
        java.lang.NullPointerException - if the name is null.
        java.lang.IllegalArgumentException - if the name has zero length.
    • Method Detail

      • getName

        public java.lang.String getName()
        Return a string name of this JAASPrincipal.

        Specified by:
        getName in interface java.security.Principal
        Returns:
        a string name of this JAASPrincipal
      • toString

        public java.lang.String toString()
        Return a string representation of this JAASPrincipal.

        Specified by:
        toString in interface java.security.Principal
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of this JAASPrincipal.
      • equals

        public boolean equals(java.lang.Object o)
        Compares the specified Object with this JAASPrincipal for equality. Returns true if the given object is also a JAASPrincipal and the two JAASPrincipals have the same String representation.

        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object to be compared for equality with this JAASPrincipal.
        Returns:
        true if the specified Object is equal to this JAASPrincipal.
      • hashCode

        public int hashCode()
        Return a hash code for this JAASPrincipal.

        Specified by:
        hashCode in interface java.security.Principal
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code for this JAASPrincipal.

© Copyright 2003, 2015 IBM Corporation. All rights reserved.
© Copyright 2003, 2015, Oracle and/or its affiliates. All rights reserved.