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
public class OAuth20Configuration extends OAuthConfiguration
The OAuh 2.0 configuration.- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringOAUTH_CODEstatic java.lang.StringSTATE_REQUEST_PARAMETER-
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 Constructor Description OAuth20Configuration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.scribejava.core.oauth.OAuthServicebuildService(org.pac4j.core.context.WebContext context, org.pac4j.core.client.IndirectClient client)Build an OAuth service from the web context.java.util.Map<java.lang.String,java.lang.String>getCustomParams()org.pac4j.core.util.generator.ValueGeneratorgetStateGenerator()booleanisWithState()voidsetCustomParams(java.util.Map<java.lang.String,java.lang.String> customParams)voidsetStateGenerator(org.pac4j.core.util.generator.ValueGenerator stateGenerator)voidsetWithState(boolean withState)java.lang.StringtoString()-
Methods inherited from class org.pac4j.oauth.config.OAuthConfiguration
getApi, getHasBeenCancelledFactory, getHttpClientConfig, getKey, getProfileDefinition, getResponseType, getScope, getSecret, internalInit, isTokenAsHeader, setApi, setHasBeenCancelledFactory, setHttpClientConfig, setKey, setProfileDefinition, setResponseType, setScope, setSecret, setTokenAsHeader
-
-
-
-
Field Detail
-
OAUTH_CODE
public static final java.lang.String OAUTH_CODE
- See Also:
- Constant Field Values
-
STATE_REQUEST_PARAMETER
public static final java.lang.String STATE_REQUEST_PARAMETER
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildService
public com.github.scribejava.core.oauth.OAuthService buildService(org.pac4j.core.context.WebContext context, org.pac4j.core.client.IndirectClient client)Build an OAuth service from the web context.- Specified by:
buildServicein classOAuthConfiguration- Parameters:
context- the web contextclient- the client- Returns:
- the OAuth service
-
getCustomParams
public java.util.Map<java.lang.String,java.lang.String> getCustomParams()
-
setCustomParams
public void setCustomParams(java.util.Map<java.lang.String,java.lang.String> customParams)
-
isWithState
public boolean isWithState()
-
setWithState
public void setWithState(boolean withState)
-
getStateGenerator
public org.pac4j.core.util.generator.ValueGenerator getStateGenerator()
-
setStateGenerator
public void setStateGenerator(org.pac4j.core.util.generator.ValueGenerator stateGenerator)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-