Class UserPrincipal

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Principal
    Direct Known Subclasses:
    DataSourceLoginService.DBUserPrincipal, JDBCLoginService.JDBCUserPrincipal

    public class UserPrincipal
    extends java.lang.Object
    implements java.security.Principal, java.io.Serializable
    UserPrincipal Represents a user with a credential. Instances of this class can be added to a Subject to present the user, while the credentials can be added directly to the Subject.
    See Also:
    Serialized Form
    • Field Detail

      • _credential

        protected final Credential _credential
    • Constructor Detail

      • UserPrincipal

        public UserPrincipal​(java.lang.String name,
                             Credential credential)
    • Method Detail

      • authenticate

        public boolean authenticate​(java.lang.Object credentials)
      • authenticate

        public boolean authenticate​(Credential c)
      • authenticate

        public boolean authenticate​(UserPrincipal u)
      • configureSubject

        public void configureSubject​(javax.security.auth.Subject subject)
      • deconfigureSubject

        public void deconfigureSubject​(javax.security.auth.Subject subject)
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface java.security.Principal
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.security.Principal
        Overrides:
        toString in class java.lang.Object