|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Authenticator
An Authenticator is used to authenticate users, log them in, log them out and check their roles.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_AUTHENTICATOR
Deprecated. DefaultAuthenticator is no longer a concrete class and there should be no reason to use this constant. Since v2.4.0 |
| Method Summary | |
|---|---|
void |
destroy()
|
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. |
java.security.Principal |
getUser(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Gets the Principal for the HttpServletRequest. |
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. |
boolean |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String username,
java.lang.String password,
boolean storeCookie)
Tries to authenticate a user. |
boolean |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
| Methods inherited from interface com.atlassian.seraph.Initable |
|---|
init |
| Field Detail |
|---|
static final java.lang.String DEFAULT_AUTHENTICATOR
| Method Detail |
|---|
void destroy()
java.lang.String getRemoteUser(javax.servlet.http.HttpServletRequest request)
Principal authenticated for the given HttpServletRequest.
request - response -
java.security.Principal getUser(javax.servlet.http.HttpServletRequest request)
Principal authenticated for the given HttpServletRequest.
request - response -
java.security.Principal getUser(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Principal for the HttpServletRequest. The RememberMeToken will be regenerated for the HttpServletResponse if the token is invalid.
request - response -
boolean isUserInRole(javax.servlet.http.HttpServletRequest request,
java.lang.String role)
RoleMapper directly
boolean login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String username,
java.lang.String password)
throws AuthenticatorException
request - 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).
boolean login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String username,
java.lang.String password,
boolean storeCookie)
throws AuthenticatorException
request - the HttpServletRequestresponse - the HttpServletResponseusername - the user name to check against the passwordpassword - the password to authenticate the user withstoreCookie - 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).
boolean logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws AuthenticatorException
AuthenticatorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||