public class DirectDigestAuthClient extends DirectClientV2<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 |
---|---|
DigestCredentials |
getCredentials(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
|
String |
getRealm() |
protected void |
internalInit(WebContext context)
Internal initialization of the object.
|
void |
setRealm(String realm) |
String |
toString() |
assertAuthenticatorTypes, getAuthenticator, getCredentialsExtractor, getProfileCreator, retrieveUserProfile, setAuthenticator, setCredentialsExtractor, setProfileCreator
redirect
addAuthorizationGenerator, getAuthorizationGenerators, getName, getUserProfile, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setName
init, reinit
public DirectDigestAuthClient()
public DirectDigestAuthClient(Authenticator digestAuthenticator)
public DirectDigestAuthClient(Authenticator digestAuthenticator, ProfileCreator profileCreator)
protected void internalInit(WebContext context)
InitializableWebObject
internalInit
in class DirectClientV2<DigestCredentials,CommonProfile>
context
- the web contextpublic DigestCredentials getCredentials(WebContext context) throws HttpAction
getCredentials
in interface Client<DigestCredentials,CommonProfile>
getCredentials
in class DirectClientV2<DigestCredentials,CommonProfile>
context
- the current web contextHttpAction
- whether an additional HTTP action is requiredpublic String getRealm()
public void setRealm(String realm)
public String toString()
toString
in class DirectClientV2<DigestCredentials,CommonProfile>
Copyright © 2016. All rights reserved.