AuthenticationAuthority is a class that implements the Authenticator
interface for authenticating a user that is independent of the
authentication mechanism being used. The specific implementation of an
authentication mechanism is provided by a AuthenticationProvider. An
AuthenticationAuthority is configured to use a specific
AuthenticationProvider by specifying the name of an
AuthenticationProviderFactory class in the AuthenticationAuthority's
constructor environment.
public static final java.lang.String PROVIDER_FACTORY
Constant that holds the name of the environment property for
specifying the AuthenticationProvider factory to use. The value
of the property should be the fully qualified class name of the
factory class that will create an AuthenticationProvider. This
property must be specified in the environment parameter passed
to the AuthenticationAuthority constructor. If it is not
specified, an AuthenticationException is thrown by the
constructor.
Constructs an AuthenticationAuthority with the given environment.
The PROVIDER_FACTORY environment parameter is required to
construct the AuthenticationProvider to be used for
authentication.
Parameters:
env - Environment parameters used to construct the
AuthenticationAuthority.
Authenticates a user with the given Credentials. The types of
user credentials passed to the method must match the
supported credentials of the AuthenticationProvider configured
for the AuthenticationAuthority. If the given credentials are
invalid, an AuthenticationFailedException is thrown.
userCredentials - the user's credentials to be
authenticated. The type of credentials
supplied must be supported by the
configured AuthenticationProvider.