public class DirectDigestAuthClient extends DirectClient<DigestCredentials,CommonProfile>
This class is the client to authenticate users directly through HTTP digest auth.
Add the commons-codec
dependency to use this class.
logger
Constructor and Description |
---|
DirectDigestAuthClient() |
DirectDigestAuthClient(Authenticator digestAuthenticator) |
DirectDigestAuthClient(Authenticator digestAuthenticator,
ProfileCreator profileCreator) |
Modifier and Type | Method and Description |
---|---|
protected void |
clientInit(WebContext context)
Initialize the client.
|
String |
getRealm() |
protected DigestCredentials |
retrieveCredentials(WebContext context)
Per RFC 2617
If a server receives a request for an access-protected object, and an
acceptable Authorization header is not sent, the server responds with
a "401 Unauthorized" status code, and a WWW-Authenticate header
|
void |
setRealm(String realm) |
String |
toString() |
getCredentials, getLogoutAction, internalInit, redirect
addAuthorizationGenerator, addAuthorizationGenerators, defaultAuthenticator, defaultCredentialsExtractor, defaultProfileCreator, getAuthenticator, getAuthorizationGenerators, getCredentialsExtractor, getName, getProfileCreator, getUserProfile, notifySessionRenewal, retrieveUserProfile, setAuthenticator, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setCredentialsExtractor, setName, setProfileCreator
init, reinit
public DirectDigestAuthClient()
public DirectDigestAuthClient(Authenticator digestAuthenticator)
public DirectDigestAuthClient(Authenticator digestAuthenticator, ProfileCreator profileCreator)
protected void clientInit(WebContext context)
DirectClient
clientInit
in class DirectClient<DigestCredentials,CommonProfile>
context
- the web contextprotected DigestCredentials retrieveCredentials(WebContext context) throws HttpAction
retrieveCredentials
in class BaseClient<DigestCredentials,CommonProfile>
context
- the web contextHttpAction
- whether an additional HTTP action is requiredpublic String getRealm()
public void setRealm(String realm)
public String toString()
toString
in class BaseClient<DigestCredentials,CommonProfile>
Copyright © 2017. All rights reserved.