Class SpnegoPrincipal

  • All Implemented Interfaces:
    Principal

    public final class SpnegoPrincipal
    extends Object
    implements Principal
    This class encapsulates a KerberosPrincipal.

    This class also has a reference to the client's/requester's delegated credential (if any). See the DelegateServletRequest documentation for more details.

    Also, see the delegation examples at http://spnego.sourceforge.net

    Author:
    Darwin V. Felix
    • Constructor Detail

      • SpnegoPrincipal

        public SpnegoPrincipal​(String name,
                               int nameType)
        Constructs a SpnegoPrincipal from the provided String input and name type input.
        Parameters:
        name - the principal name
        nameType - the name type of the principal
      • SpnegoPrincipal

        public SpnegoPrincipal​(String name,
                               int nameType,
                               GSSCredential delegCred)
        Constructs a SpnegoPrincipal from the provided String input and name type input.
        Parameters:
        name - the principal name
        nameType - the name type of the principal
        delegCred - this principal's delegated credential (if any)
    • Method Detail

      • getDelegatedCredential

        public GSSCredential getDelegatedCredential()
        Returns this Principal's delegated credential or null.
        Returns:
        Principal's delegated credential or null.
      • getNameType

        public int getNameType()
        Returns the name type of the KerberosPrincipal.
        Returns:
        name type of the KerberosPrincipal
      • getRealm

        public String getRealm()
        Returns the realm component of this Kerberos principal.
        Returns:
        realm component of this Kerberos principal