public class NoopAuthenticator extends AbstractAuthenticator
PRINCIPALAUTH_STATE, RETURN_URI| Constructor and Description |
|---|
NoopAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain,
String authStateValue,
String returnUri)
Implement this method to perform the actual authentication.
|
boolean |
canCommence(javax.servlet.http.HttpServletRequest request)
Implement this method to state whether the given request is a continuation that can be handled.
|
protected AuthenticatedPrincipal |
getAuthenticatedPrincipal() |
destroy, doFilter, init, setPrincipalgetAuthStateValue, getReturnUri, setAuthStateValuepublic boolean canCommence(javax.servlet.http.HttpServletRequest request)
AbstractAuthenticatorcanCommence in class AbstractAuthenticatorrequest - the HttpServletRequestpublic void authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain,
String authStateValue,
String returnUri)
throws IOException,
javax.servlet.ServletException
AbstractAuthenticatorBasicAuthenticator or
FormLoginAuthenticator as an example.
In general, the contract is:
assert that the user is authenticated. You can use the request and response for this. When not yet authenticated:
AbstractFilter.getAuthStateValue(javax.servlet.ServletRequest) to
pass-around for user agent communicationAbstractFilter.getReturnUri(javax.servlet.ServletRequest) if you need to
step out and return to the current location
When authenticated:
AbstractFilter.setAuthStateValue(javax.servlet.ServletRequest, String)#setPrincipal(ServletRequest, RolesPrincipal)authenticate in class AbstractAuthenticatorrequest - the ServletRequestresponse - the ServletResponsechain - the original http servlet filter chainauthStateValue - the authState nonce to set back on the ServletRequest when
donereturnUri - the startpoint of the chain if you want to return from a form or
other (external) componentIOExceptionjavax.servlet.ServletExceptionprotected AuthenticatedPrincipal getAuthenticatedPrincipal()
Copyright © 2012–2014 SURFnet bv, The Netherlands. All rights reserved.