Class NullRealm

  • All Implemented Interfaces:
    javax.management.MBeanRegistration, Contained, 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

      • getPassword

        protected java.lang.String getPassword​(java.lang.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 java.security.Principal getPrincipal​(java.lang.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.