Package org.pac4j.http.client.direct
Class DirectDigestAuthClient
- java.lang.Object
-
- org.pac4j.core.util.InitializableObject
-
- org.pac4j.core.client.BaseClient
-
- org.pac4j.core.client.DirectClient
-
- org.pac4j.http.client.direct.DirectDigestAuthClient
-
- All Implemented Interfaces:
org.pac4j.core.client.Client
public class DirectDigestAuthClient extends org.pac4j.core.client.DirectClient
This class is the client to authenticate users directly through HTTP digest auth.
Add the
commons-codec
dependency to use this class.- Since:
- 1.9.0
- Author:
- Mircea Carasel
-
-
Constructor Summary
Constructors Constructor Description DirectDigestAuthClient()
DirectDigestAuthClient(org.pac4j.core.credentials.authenticator.Authenticator digestAuthenticator)
DirectDigestAuthClient(org.pac4j.core.credentials.authenticator.Authenticator digestAuthenticator, org.pac4j.core.profile.creator.ProfileCreator profileCreator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getRealm()
protected void
internalInit()
protected java.util.Optional<org.pac4j.core.credentials.Credentials>
retrieveCredentials(org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)
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 headervoid
setRealm(java.lang.String realm)
java.lang.String
toString()
-
Methods inherited from class org.pac4j.core.client.DirectClient
afterInternalInit, beforeInternalInit, getCredentials, getLogoutAction, getRedirectionAction
-
Methods inherited from class org.pac4j.core.client.BaseClient
addAuthorizationGenerator, addAuthorizationGenerators, defaultAuthenticator, defaultCredentialsExtractor, defaultProfileCreator, getAuthenticator, getAuthorizationGenerators, getCredentialsExtractor, getCustomProperties, getName, getProfileCreator, getProfileFactoryWhenNotAuthenticated, getSaveProfileInSession, getUserProfile, isMultiProfile, notifySessionRenewal, renewUserProfile, retrieveUserProfile, setAuthenticator, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setCredentialsExtractor, setCustomProperties, setMultiProfile, setName, setProfileCreator, setProfileFactoryWhenNotAuthenticated, setSaveProfileInSession
-
-
-
-
Constructor Detail
-
DirectDigestAuthClient
public DirectDigestAuthClient()
-
DirectDigestAuthClient
public DirectDigestAuthClient(org.pac4j.core.credentials.authenticator.Authenticator digestAuthenticator)
-
DirectDigestAuthClient
public DirectDigestAuthClient(org.pac4j.core.credentials.authenticator.Authenticator digestAuthenticator, org.pac4j.core.profile.creator.ProfileCreator profileCreator)
-
-
Method Detail
-
internalInit
protected void internalInit()
- Specified by:
internalInit
in classorg.pac4j.core.util.InitializableObject
-
retrieveCredentials
protected java.util.Optional<org.pac4j.core.credentials.Credentials> retrieveCredentials(org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)
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- Overrides:
retrieveCredentials
in classorg.pac4j.core.client.BaseClient
-
getRealm
public java.lang.String getRealm()
-
setRealm
public void setRealm(java.lang.String realm)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.pac4j.core.client.DirectClient
-
-