public abstract class AbstractAuthenticator extends Object implements Authenticator, Serializable
| Constructor and Description |
|---|
AbstractAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected SecurityConfig |
getConfig() |
String |
getRemoteUser(javax.servlet.http.HttpServletRequest request)
Gets the username of the
Principal authenticated for the given HttpServletRequest. |
Principal |
getUser(javax.servlet.http.HttpServletRequest request)
Gets the
Principal authenticated for the given HttpServletRequest. |
abstract Principal |
getUser(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Gets the
Principal for the HttpServletRequest. |
void |
init(Map<String,String> params,
SecurityConfig config)
Initialise the configuration object with the given "init-params".
|
boolean |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String username,
String password)
Tries to authenticate a user.
|
abstract boolean |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String username,
String password,
boolean cookie)
Tries to authenticate a user.
|
abstract boolean |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
public void init(Map<String,String> params, SecurityConfig config)
Initablepublic void destroy()
destroy in interface Authenticatorpublic String getRemoteUser(javax.servlet.http.HttpServletRequest request)
AuthenticatorPrincipal authenticated for the given HttpServletRequest.getRemoteUser in interface Authenticatorpublic Principal getUser(javax.servlet.http.HttpServletRequest request)
AuthenticatorPrincipal authenticated for the given HttpServletRequest.getUser in interface Authenticatorpublic abstract Principal getUser(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
AuthenticatorPrincipal for the HttpServletRequest. The RememberMeToken will be regenerated for the HttpServletResponse if the token is invalid.getUser in interface Authenticatorpublic boolean login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String username,
String password)
throws AuthenticatorException
Authenticatorlogin in interface Authenticatorrequest - the HttpServletRequestresponse - the HttpServletResponseusername - the user name to check against the passwordpassword - the password to authenticate the user withAuthenticatorException - if an error occurs that stops the user from being authenticated (eg remote communication failure).public abstract boolean login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String username,
String password,
boolean cookie)
throws AuthenticatorException
Authenticatorlogin in interface Authenticatorrequest - the HttpServletRequestresponse - the HttpServletResponseusername - the user name to check against the passwordpassword - the password to authenticate the user withcookie - whether to set a remember me cookie on successful loginAuthenticatorException - if an error occurs that stops the user from being authenticated (eg remote communication failure).public abstract boolean logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws AuthenticatorException
logout in interface AuthenticatorAuthenticatorExceptionprotected SecurityConfig getConfig()
Copyright © 2018 Atlassian. All rights reserved.