Package org.pac4j.core.client
Class DirectClient
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.client.BaseClient
org.pac4j.core.client.DirectClient
- All Implemented Interfaces:
Client
- Direct Known Subclasses:
AnonymousClient
Direct client: credentials are passed and authentication occurs for every HTTP request.
- Since:
- 1.9.0
- Author:
- Jerome Leleu
-
Field Summary
Fields inherited from class org.pac4j.core.client.BaseClient
logger, saveProfileInSession
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
afterInternalInit
(boolean forceReinit) protected void
beforeInternalInit
(boolean forceReinit) final Optional<RedirectionAction>
getLogoutAction
(CallContext ctx, UserProfile currentProfile, String targetUrl) Return the logout action (indirect clients).final Optional<RedirectionAction>
Return the redirection action to the authentication provider (indirect clients).final HttpAction
processLogout
(CallContext ctx, Credentials credentials) Process the logout.Methods inherited from class org.pac4j.core.client.BaseClient
addAuthorizationGenerator, addAuthorizationGenerators, checkCredentials, getCredentials, getName, getSaveProfileInSession, getUserProfile, internalValidateCredentials, isMultiProfile, notifySessionRenewal, renewUserProfile, setAuthenticatorIfUndefined, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setCredentialsExtractorIfUndefined, setCustomProperties, setProfileCreatorIfUndefined, setProfileFactoryWhenNotAuthenticated, validateCredentials
Methods inherited from class org.pac4j.core.util.InitializableObject
getNbAttempts, init, init, internalInit, isInitialized, reinit, shouldInitialize
-
Constructor Details
-
DirectClient
public DirectClient()
-
-
Method Details
-
beforeInternalInit
protected void beforeInternalInit(boolean forceReinit) - Overrides:
beforeInternalInit
in classInitializableObject
-
afterInternalInit
protected final void afterInternalInit(boolean forceReinit) - Overrides:
afterInternalInit
in classInitializableObject
-
getRedirectionAction
Description copied from interface:Client
Return the redirection action to the authentication provider (indirect clients).
- Parameters:
ctx
- the current context- Returns:
- the redirection to perform (optional)
-
processLogout
Description copied from interface:Client
Process the logout.- Parameters:
ctx
- the current contextcredentials
- the logout credentials- Returns:
- the resulting HTTP action
-
getLogoutAction
public final Optional<RedirectionAction> getLogoutAction(CallContext ctx, UserProfile currentProfile, String targetUrl) Description copied from interface:Client
Return the logout action (indirect clients).
- Parameters:
ctx
- the current contextcurrentProfile
- the currentProfiletargetUrl
- the target url after logout- Returns:
- the redirection to perform (optional)
-