Class OAuth20Authenticator
java.lang.Object
org.pac4j.oauth.credentials.authenticator.OAuth20Authenticator
- All Implemented Interfaces:
org.pac4j.core.credentials.authenticator.Authenticator
OAuth 2.0 authenticator.
- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.pac4j.core.client.IndirectClientprotected OAuthConfigurationprotected final org.slf4j.LoggerFields inherited from interface org.pac4j.core.credentials.authenticator.Authenticator
ALWAYS_VALIDATE -
Constructor Summary
ConstructorsConstructorDescriptionOAuth20Authenticator(OAuth20Configuration configuration, org.pac4j.core.client.IndirectClient client) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidretrieveAccessToken(org.pac4j.core.context.WebContext context, org.pac4j.core.credentials.Credentials credentials) Retrieve the access token from OAuth credentials.voidvalidate(org.pac4j.core.credentials.Credentials credentials, org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
configuration
-
client
protected org.pac4j.core.client.IndirectClient client
-
-
Constructor Details
-
OAuth20Authenticator
public OAuth20Authenticator(OAuth20Configuration configuration, org.pac4j.core.client.IndirectClient client)
-
-
Method Details
-
retrieveAccessToken
protected void retrieveAccessToken(org.pac4j.core.context.WebContext context, org.pac4j.core.credentials.Credentials credentials) Retrieve the access token from OAuth credentials.- Parameters:
context- the web contextcredentials- credentials
-
validate
public void validate(org.pac4j.core.credentials.Credentials credentials, org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore) - Specified by:
validatein interfaceorg.pac4j.core.credentials.authenticator.Authenticator
-