public void authenticate ( ) { log . info ( "Authenticating user: " + this . name ) ; WebSession result = null ; try { result = getContext ( ) . getAuthenticationMethod ( ) . authenticate ( getContext ( ) . getSessionManagementMethod ( ) , this . authenticationCredentials , this ) ; } catch ( UnsupportedAuthenticationCredentialsException e ) { log . error ( "User does not have the expected type of credentials:" , e ) ; } // no issues appear if a simultaneous call to #queueAuthentication() is made synchronized ( this ) { this . lastSuccessfulAuthTime = System . currentTimeMillis ( ) ; this . authenticatedSession = result ; } }
Authenticates the user using its authentication credentials and the authentication method corresponding to its Context .