Class NullRealm

  • All Implemented Interfaces:
    MBeanRegistration, Contained, GSSRealm, JmxEnabled, Lifecycle, Realm

    public class NullRealm
    extends RealmBase
    Minimal Realm implementation that always returns null when an attempt is made to validate a user name and password. It is intended to be used as a default Realm implementation when no other Realm is specified.
    • Constructor Detail

      • NullRealm

        public NullRealm()
    • Method Detail

      • getName

        @Deprecated
        protected String getName()
        Deprecated.
        Specified by:
        getName in class RealmBase
        Returns:
        a short name for this Realm implementation, for use in log messages.
      • getPassword

        protected String getPassword​(String username)
        Description copied from class: RealmBase
        Get the password for the specified user.
        Specified by:
        getPassword in class RealmBase
        Parameters:
        username - The user name
        Returns:
        the password associated with the given principal's user name.
      • getPrincipal

        protected Principal getPrincipal​(String username)
        Description copied from class: RealmBase
        Get the principal associated with the specified user.
        Specified by:
        getPrincipal in class RealmBase
        Parameters:
        username - The user name
        Returns:
        the Principal associated with the given user name.