Class AuthenticatedUserRealm

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

public class AuthenticatedUserRealm extends RealmBase
This Realm is intended for use with Authenticator implementations (SSLAuthenticator, SpnegoAuthenticator) that authenticate the user as well as obtain the user credentials. An authenticated Principal is always created from the user name presented to without further validation.

Note: It is unsafe to use this Realm with Authenticator implementations that do not validate the provided credentials.

  • Constructor Details

    • AuthenticatedUserRealm

      public AuthenticatedUserRealm()
  • Method Details

    • 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.