AuthenticationStrategy

A {@code AuthenticationStrategy} implementation assists the {@link ModularRealmAuthenticator} during the log-in process in a pluggable realm (PAM) environment.

<p>The {@code ModularRealmAuthenticator} will consult implementations of this interface on what to do during each interaction with the configured Realms. This allows a pluggable strategy of whether or not an authentication attempt must be successful for all realms, only 1 or more realms, no realms, etc.

@see AllSuccessfulStrategy @see AtLeastOneSuccessfulStrategy @see FirstSuccessfulStrategy

Members

Functions

afterAllAttempts
AuthenticationInfo afterAllAttempts(AuthenticationToken token, AuthenticationInfo aggregate)

Method invoked by the ModularAuthenticator signifying that all of its configured Realms have been consulted for account data, allowing post-processing after all realms have completed.

afterAttempt
AuthenticationInfo afterAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo singleRealmInfo, AuthenticationInfo aggregateInfo, Throwable t)

Method invoked by the ModularAuthenticator just after the given realm has been consulted for authentication, allowing post-authentication-attempt logic for that realm only.

beforeAllAttempts
AuthenticationInfo beforeAllAttempts(Realm[] realms, AuthenticationToken token)

Method invoked by the ModularAuthenticator signifying that the authentication process is about to begin for the specified {@code token} - called before any {@code Realm} is actually invoked.

beforeAttempt
AuthenticationInfo beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo aggregate)

Method invoked by the ModularAuthenticator just prior to the realm being consulted for account data, allowing pre-authentication-attempt logic for that realm only.

Meta