Authenticate a user.
Parameters: username - provided by the user at login Parameters: credentials - provided by the user at login Parameters: request - a Request value authenticated JAASUserPrincipal or null if authenticated failed
Logout a previously logged in user.
This can only work for FORM authentication
as BasicAuthentication is stateless.
The user's LoginContext logout() method is called.
Parameters: user - an Principal value
Temporarily adds a role to a user.
Temporarily granting a role pushes the role onto a stack
of temporary roles. Temporary roles must therefore be
removed in order.
Parameters: user - the Principal to which to add the role Parameters: role - the role name the Principal with the role added