Implementation of the {@link Authenticator} interface that functions in the following manner:
<ol>
<li>Calls template {@link #doAuthenticate doAuthenticate} method for subclass execution of the actual
authentication behavior.</li>
<li>If an {@code AuthenticationException} is thrown during {@code doAuthenticate},
{@link #notifyFailure(AuthenticationToken, AuthenticationException) notify} any registered
{@link AuthenticationListener AuthenticationListener}s of the exception and then propagate the exception
for the caller to handle.</li>
<li>If no exception is thrown (indicating a successful login),
{@link #notifySuccess(AuthenticationToken, AuthenticationInfo) notify} any registered
{@link AuthenticationListener AuthenticationListener}s of the successful attempt.</li>
<li>Return the {@code AuthenticationInfo}</li>
</ol>
@param token the submitted token representing the subject's (user's) login principals and credentials.
@return the AuthenticationInfo referencing the authenticated user's account data.
@throws AuthenticationException if there is any problem during the authentication process - see the
interface's JavaDoc for a more detailed explanation.
Implementation of the {@link Authenticator} interface that functions in the following manner: <ol> <li>Calls template {@link #doAuthenticate doAuthenticate} method for subclass execution of the actual authentication behavior.</li> <li>If an {@code AuthenticationException} is thrown during {@code doAuthenticate}, {@link #notifyFailure(AuthenticationToken, AuthenticationException) notify} any registered {@link AuthenticationListener AuthenticationListener}s of the exception and then propagate the exception for the caller to handle.</li> <li>If no exception is thrown (indicating a successful login), {@link #notifySuccess(AuthenticationToken, AuthenticationInfo) notify} any registered {@link AuthenticationListener AuthenticationListener}s of the successful attempt.</li> <li>Return the {@code AuthenticationInfo}</li> </ol>
@param token the submitted token representing the subject's (user's) login principals and credentials. @return the AuthenticationInfo referencing the authenticated user's account data. @throws AuthenticationException if there is any problem during the authentication process - see the interface's JavaDoc for a more detailed explanation.