|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.plugin.rest.filter.AbstractBasicAuthenticationFilter
public abstract class AbstractBasicAuthenticationFilter
Abstract implementation for a Basic Authentication filter.
Nested Class Summary | |
---|---|
protected class |
AbstractBasicAuthenticationFilter.Credentials
|
Constructor Summary | |
---|---|
AbstractBasicAuthenticationFilter()
|
Method Summary | |
---|---|
void |
destroy()
|
protected void |
ensureSeraphForwardsRequest(javax.servlet.ServletRequest request)
Ensures that Seraph simply forwards the request without processing it. |
protected String |
getAuthenticatedEntity(javax.servlet.http.HttpServletRequest request)
Returns the authenticated entity from the request , or null if there is no authenticated entity. |
protected abstract String |
getAuthenticationErrorMessage()
Returns the authentication error message. |
protected AbstractBasicAuthenticationFilter.Credentials |
getBasicAuthCredentials(javax.servlet.http.HttpServletRequest request)
Returns the Basic Auth credentials. |
protected abstract String |
getBasicRealm()
Returns the Basic Realm in the WWW-Authenticate header. |
protected abstract String |
getEntityAttributeKey()
Returns the HTTP request attribute key for the entity. |
void |
init(javax.servlet.FilterConfig filterConfig)
|
protected boolean |
isAuthenticated(javax.servlet.http.HttpServletRequest request,
AbstractBasicAuthenticationFilter.Credentials credentials)
Consider the request as authenticated, if the entity name in it matches the entity name saved in the HttpSession . |
protected void |
respondWithChallenge(javax.servlet.http.HttpServletResponse response)
Responds to request with a Basic Authentication challenge. |
protected void |
setAuthenticatedEntity(javax.servlet.http.HttpServletRequest request,
String name)
Sets the authenticated entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.Filter |
---|
doFilter |
Constructor Detail |
---|
public AbstractBasicAuthenticationFilter()
Method Detail |
---|
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
protected AbstractBasicAuthenticationFilter.Credentials getBasicAuthCredentials(javax.servlet.http.HttpServletRequest request)
request
- the request
protected boolean isAuthenticated(javax.servlet.http.HttpServletRequest request, AbstractBasicAuthenticationFilter.Credentials credentials)
HttpSession
.
request
- HTTP servlet request possibly containing a HttpSessioncredentials
- credentials sent with the request
protected void respondWithChallenge(javax.servlet.http.HttpServletResponse response) throws IOException
response
- the HTTP response
IOException
public void destroy()
destroy
in interface javax.servlet.Filter
protected void ensureSeraphForwardsRequest(javax.servlet.ServletRequest request)
request
- HttpServletRequestprotected String getAuthenticatedEntity(javax.servlet.http.HttpServletRequest request)
request
, or null if there is no authenticated entity.
request
- Request
request
, or null if there is no authenticated entity.protected void setAuthenticatedEntity(javax.servlet.http.HttpServletRequest request, String name)
request
- Requestname
- the name of the authenticated entityprotected abstract String getEntityAttributeKey()
protected abstract String getAuthenticationErrorMessage()
protected abstract String getBasicRealm()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |