|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.seraph.auth.AbstractAuthenticator
public abstract class AbstractAuthenticator
An abstract implementation of Authenticator that implements a lot of base methods
| Field Summary |
|---|
| Fields inherited from interface com.atlassian.seraph.auth.Authenticator |
|---|
DEFAULT_AUTHENTICATOR |
| Constructor Summary | |
|---|---|
AbstractAuthenticator()
|
|
| Method Summary | |
|---|---|
void |
destroy()
|
protected SecurityConfig |
getConfig()
|
java.lang.String |
getRemoteUser(javax.servlet.http.HttpServletRequest request)
Gets the username of the Principal authenticated for the given HttpServletRequest. |
java.security.Principal |
getUser(javax.servlet.http.HttpServletRequest request)
Gets the Principal authenticated for the given HttpServletRequest. |
abstract java.security.Principal |
getUser(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Gets the Principal for the HttpServletRequest. |
void |
init(java.util.Map<java.lang.String,java.lang.String> params,
SecurityConfig config)
Initialise the configuration object with the given "init-params". |
abstract boolean |
isUserInRole(javax.servlet.http.HttpServletRequest request,
java.lang.String role)
Deprecated. Use RoleMapper directly |
boolean |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String username,
java.lang.String password)
Tries to authenticate a user. |
abstract boolean |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String username,
java.lang.String password,
boolean cookie)
Tries to authenticate a user. |
abstract boolean |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractAuthenticator()
| Method Detail |
|---|
public void init(java.util.Map<java.lang.String,java.lang.String> params,
SecurityConfig config)
Initable
init in interface Initableparams - The map of "init-params" extracted from the Seraph config file. This is guaranteed not null.config - The Seraph SecurityConfig class that is initialising the config objects. This object will only be partially initialised at this time.public void destroy()
destroy in interface Authenticator
@Deprecated
public abstract boolean isUserInRole(javax.servlet.http.HttpServletRequest request,
java.lang.String role)
RoleMapper directly
isUserInRole in interface Authenticatorpublic java.lang.String getRemoteUser(javax.servlet.http.HttpServletRequest request)
AuthenticatorPrincipal authenticated for the given HttpServletRequest.
getRemoteUser in interface Authenticatorpublic java.security.Principal getUser(javax.servlet.http.HttpServletRequest request)
AuthenticatorPrincipal authenticated for the given HttpServletRequest.
getUser in interface Authenticator
public abstract java.security.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 Authenticator
public boolean login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String username,
java.lang.String password)
throws AuthenticatorException
Authenticator
login in interface Authenticatorrequest - the HttpServletRequestresponse - the HttpServletResponseusername - the user name to check against the passwordpassword - the password to authenticate the user with
AuthenticatorException - 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,
java.lang.String username,
java.lang.String password,
boolean cookie)
throws AuthenticatorException
Authenticator
login 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 login
AuthenticatorException - 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||