|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 java.lang.String |
getAuthenticatedEntity(javax.servlet.http.HttpServletRequest request)
Returns the authenticated entity from the request, or null if there is no authenticated entity. |
protected abstract java.lang.String |
getAuthenticationErrorMessage()
Returns the authentication error message. |
protected AbstractBasicAuthenticationFilter.Credentials |
getBasicAuthCredentials(javax.servlet.http.HttpServletRequest request)
Returns the Basic Auth credentials. |
protected abstract java.lang.String |
getBasicRealm()
Returns the Basic Realm in the WWW-Authenticate header. |
protected abstract java.lang.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,
java.lang.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.Filterjavax.servlet.ServletExceptionprotected 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 java.io.IOException
response - the HTTP response
java.io.IOExceptionpublic void destroy()
destroy in interface javax.servlet.Filterprotected void ensureSeraphForwardsRequest(javax.servlet.ServletRequest request)
request - HttpServletRequestprotected java.lang.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,
java.lang.String name)
request - Requestname - the name of the authenticated entityprotected abstract java.lang.String getEntityAttributeKey()
protected abstract java.lang.String getAuthenticationErrorMessage()
protected abstract java.lang.String getBasicRealm()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||