Package org.pac4j.oauth.config
Class OAuth20Configuration
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.client.config.BaseClientConfiguration
org.pac4j.oauth.config.OAuthConfiguration
org.pac4j.oauth.config.OAuth20Configuration
- Direct Known Subclasses:
FacebookConfiguration,HiOrgServerConfiguration,LinkedIn2Configuration,OkConfiguration,VkConfiguration
The OAuh 2.0 configuration.
- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstantOAUTH_CODE="code"static final StringConstantSTATE_REQUEST_PARAMETER="state"Fields inherited from class org.pac4j.oauth.config.OAuthConfiguration
api, hasBeenCancelledFactory, httpClientConfig, key, OAUTH_TOKEN, profileDefinition, RESPONSE_TYPE_CODE, responseType, scope, secret, tokenAsHeader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.github.scribejava.core.oauth.OAuthServicebuildService(org.pac4j.core.context.WebContext context, org.pac4j.core.client.IndirectClient client) buildService.voidsetStateGenerator(org.pac4j.core.util.generator.ValueGenerator stateGenerator) Setter for the fieldstateGenerator.Methods inherited from class org.pac4j.oauth.config.OAuthConfiguration
internalInitMethods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getInitialized, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize, toString
-
Field Details
-
OAUTH_CODE
ConstantOAUTH_CODE="code"- See Also:
-
STATE_REQUEST_PARAMETER
ConstantSTATE_REQUEST_PARAMETER="state"- See Also:
-
-
Constructor Details
-
OAuth20Configuration
public OAuth20Configuration()
-
-
Method Details
-
buildService
public com.github.scribejava.core.oauth.OAuthService buildService(org.pac4j.core.context.WebContext context, org.pac4j.core.client.IndirectClient client) buildService.
Build an OAuth service from the web context.- Specified by:
buildServicein classOAuthConfiguration- Parameters:
context- aWebContextobjectclient- aIndirectClientobject- Returns:
- a
OAuthServiceobject
-
setStateGenerator
public void setStateGenerator(org.pac4j.core.util.generator.ValueGenerator stateGenerator) Setter for the field
stateGenerator.- Parameters:
stateGenerator- aValueGeneratorobject
-