public class HttpBasicAuthenticationHandler extends AuthenticationHandler
setHttpBasicAuthorizationHeader(HttpServletResponse, String)
to
trigger a HTTP Authorization response, the handler will deal with
decoding of the next request.Modifier and Type | Field and Description |
---|---|
static int |
ORDER_BASIC_HTTP_HANDLER
Order used by the HttpBasicAuthenticationHandler
|
static java.lang.String |
REVISION |
channel, GENERIC_BAD_AUTHENTICATION_MSG
Modifier and Type | Method and Description |
---|---|
static Member |
checkAuthenticationFromHTTPAuthorization(javax.servlet.http.HttpServletRequest request)
Returns the member corresponding to the HTTP Authorization header
available in the request.
|
static HttpBasicAuthenticationHandler |
getInstance() |
void |
loadProperties()
This method will be called by the AuthenticationManager each time the
Channel properties are loaded/reloaded.
|
void |
login(AuthenticationContext ctxt)
Authenticate a member.
|
static void |
setHttpBasicAuthorizationHeader(javax.servlet.http.HttpServletResponse response,
java.lang.String realm)
Set a 401 status code (UNAUTHORIZED) and add the "WWW-Authenticate"
header to the given response using the given realm.
|
public static final java.lang.String REVISION
public static final int ORDER_BASIC_HTTP_HANDLER
public static final HttpBasicAuthenticationHandler getInstance()
public void loadProperties()
AuthenticationHandler
loadProperties
in class AuthenticationHandler
public void login(AuthenticationContext ctxt) throws java.io.IOException
AuthenticationHandler
AuthenticationContext
object (request, response, login.. etc) AuthenticationContext.setLoggedMember(com.jalios.jcms.Member)
AuthenticationContext.doChain()
,AuthenticationContext
.login
in class AuthenticationHandler
ctxt
- the AuthenticationContext
used for this loginjava.io.IOException
public static final Member checkAuthenticationFromHTTPAuthorization(javax.servlet.http.HttpServletRequest request) throws java.io.IOException
request
- the request where to look for HTTP Authorization headerjava.io.IOException
- if the underneath login operation with the userId/password could not be performedpublic static final void setHttpBasicAuthorizationHeader(javax.servlet.http.HttpServletResponse response, java.lang.String realm)
response
- the HttpServletResponse of which to set status and add headerrealm
- the Basic Realm to set in the responseCopyright © 2001-2010 Jalios SA. All Rights Reserved.