Package org.pac4j.oidc.config
Class OidcConfiguration
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.client.config.BaseClientConfiguration
org.pac4j.oidc.config.OidcConfiguration
- Direct Known Subclasses:
AppleOidcConfiguration
,AzureAd2OidcConfiguration
,KeycloakOidcConfiguration
public class OidcConfiguration
extends org.pac4j.core.client.config.BaseClientConfiguration
OpenID Connect configuration.
- Since:
- 1.9.2
- Author:
- Jerome Leleu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<com.nimbusds.oauth2.sdk.ResponseType>
ConstantAUTHORIZATION_CODE_FLOWS
static final String
ConstantCLIENT_ID="client_id"
static final String
ConstantCODE_CHALLENGE="code_challenge"
static final String
ConstantCODE_CHALLENGE_METHOD="code_challenge_method"
static final String
ConstantCUSTOM_PARAMS="custom_params"
static final int
ConstantDEFAULT_MAX_CLOCK_SKEW=30
static final int
ConstantDEFAULT_TOKEN_EXPIRATION_ADVANCE=0
static final List<com.nimbusds.oauth2.sdk.ResponseType>
ConstantHYBRID_CODE_FLOWS
static final List<com.nimbusds.oauth2.sdk.ResponseType>
ConstantIMPLICIT_FLOWS
static final String
ConstantMAX_AGE="max_age"
static final String
ConstantNONCE="nonce"
protected OidcOpMetadataResolver
static final String
ConstantPROMPT="prompt"
static final String
ConstantREDIRECT_URI="redirect_uri"
static final String
ConstantRESPONSE_MODE="response_mode"
static final String
ConstantRESPONSE_TYPE="response_type"
static final String
ConstantSCOPE="scope"
static final String
ConstantSTATE="state"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCustomParam
(String key, String value) addCustomParam.void
configureHttpRequest
(com.nimbusds.oauth2.sdk.http.HTTPRequest request) configureHttpRequest.findLogoutUrl.com.nimbusds.oauth2.sdk.pkce.CodeChallengeMethod
findPkceMethod.com.nimbusds.jose.util.ResourceRetriever
findResourceRetriever.getCustomParam
(String name) getCustomParam.Getter for the fieldresponseType
.int
Getter for the fieldtokenExpirationAdvance
.protected void
internalInit
(boolean forceReinit) void
setClientAuthenticationMethodAsString.void
setCodeVerifierGenerator
(org.pac4j.core.util.generator.ValueGenerator codeVerifierGenerator) Setter for the fieldcodeVerifierGenerator
.void
setCustomParams
(Map<String, String> customParams) Setter for the fieldcustomParams
.void
setDiscoveryURIIfUndefined
(String discoveryURI) setDiscoveryURIIfUndefined.void
setPreferredJwsAlgorithmAsString
(String preferredJwsAlgorithm) setPreferredJwsAlgorithmAsString.void
setResponseType
(String responseType) Setter for the fieldresponseType
.void
setStateGenerator
(org.pac4j.core.util.generator.ValueGenerator stateGenerator) Setter for the fieldstateGenerator
.void
setSupportedClientAuthenticationMethods
(Set<com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod> supportedClientAuthenticationMethods) Setter for the fieldsupportedClientAuthenticationMethods
.void
setValueRetriever
(ValueRetriever valueRetriever) Setter for the fieldvalueRetriever
.Methods 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
-
SCOPE
ConstantSCOPE="scope"
- See Also:
-
CUSTOM_PARAMS
ConstantCUSTOM_PARAMS="custom_params"
- See Also:
-
RESPONSE_TYPE
ConstantRESPONSE_TYPE="response_type"
- See Also:
-
RESPONSE_MODE
ConstantRESPONSE_MODE="response_mode"
- See Also:
-
REDIRECT_URI
ConstantREDIRECT_URI="redirect_uri"
- See Also:
-
CLIENT_ID
ConstantCLIENT_ID="client_id"
- See Also:
-
STATE
ConstantSTATE="state"
- See Also:
-
MAX_AGE
ConstantMAX_AGE="max_age"
- See Also:
-
PROMPT
ConstantPROMPT="prompt"
- See Also:
-
NONCE
ConstantNONCE="nonce"
- See Also:
-
CODE_CHALLENGE
ConstantCODE_CHALLENGE="code_challenge"
- See Also:
-
CODE_CHALLENGE_METHOD
ConstantCODE_CHALLENGE_METHOD="code_challenge_method"
- See Also:
-
AUTHORIZATION_CODE_FLOWS
ConstantAUTHORIZATION_CODE_FLOWS
-
IMPLICIT_FLOWS
ConstantIMPLICIT_FLOWS
-
HYBRID_CODE_FLOWS
ConstantHYBRID_CODE_FLOWS
-
DEFAULT_MAX_CLOCK_SKEW
public static final int DEFAULT_MAX_CLOCK_SKEWConstantDEFAULT_MAX_CLOCK_SKEW=30
- See Also:
-
DEFAULT_TOKEN_EXPIRATION_ADVANCE
public static final int DEFAULT_TOKEN_EXPIRATION_ADVANCEConstantDEFAULT_TOKEN_EXPIRATION_ADVANCE=0
- See Also:
-
opMetadataResolver
-
-
Constructor Details
-
OidcConfiguration
public OidcConfiguration()
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) - Specified by:
internalInit
in classorg.pac4j.core.util.InitializableObject
-
setDiscoveryURIIfUndefined
setDiscoveryURIIfUndefined.
- Parameters:
discoveryURI
- aString
object
-
getCustomParam
getCustomParam.
-
setCustomParams
Setter for the field
customParams
.- Parameters:
customParams
- aMap
object
-
addCustomParam
addCustomParam.
-
setClientAuthenticationMethodAsString
setClientAuthenticationMethodAsString.
- Parameters:
auth
- aString
object
-
setSupportedClientAuthenticationMethods
public void setSupportedClientAuthenticationMethods(Set<com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod> supportedClientAuthenticationMethods) Setter for the field
supportedClientAuthenticationMethods
.- Parameters:
supportedClientAuthenticationMethods
- aSet
object
-
findPkceMethod
public com.nimbusds.oauth2.sdk.pkce.CodeChallengeMethod findPkceMethod()findPkceMethod.
- Returns:
- a
CodeChallengeMethod
object
-
setPreferredJwsAlgorithmAsString
setPreferredJwsAlgorithmAsString.
- Parameters:
preferredJwsAlgorithm
- aString
object
-
configureHttpRequest
public void configureHttpRequest(com.nimbusds.oauth2.sdk.http.HTTPRequest request) configureHttpRequest.
- Parameters:
request
- aHTTPRequest
object
-
findResourceRetriever
public com.nimbusds.jose.util.ResourceRetriever findResourceRetriever()findResourceRetriever.
- Returns:
- a
ResourceRetriever
object
-
setResponseType
Setter for the field
responseType
.- Parameters:
responseType
- aString
object
-
findLogoutUrl
findLogoutUrl.
- Returns:
- a
String
object
-
getTokenExpirationAdvance
public int getTokenExpirationAdvance()Getter for the field
tokenExpirationAdvance
.- Returns:
- a int
-
setStateGenerator
public void setStateGenerator(org.pac4j.core.util.generator.ValueGenerator stateGenerator) Setter for the field
stateGenerator
.- Parameters:
stateGenerator
- aValueGenerator
object
-
setCodeVerifierGenerator
public void setCodeVerifierGenerator(org.pac4j.core.util.generator.ValueGenerator codeVerifierGenerator) Setter for the field
codeVerifierGenerator
.- Parameters:
codeVerifierGenerator
- aValueGenerator
object
-
setValueRetriever
Setter for the field
valueRetriever
.- Parameters:
valueRetriever
- aValueRetriever
object
-
getResponseType
Getter for the field
responseType
.- Returns:
- a
String
object
-