Package org.wildfly.security.http.oidc
Class OidcClientConfiguration
java.lang.Object
org.wildfly.security.http.oidc.OidcClientConfiguration
- Direct Known Subclasses:
OidcClientContext.OidcClientConfigurationDelegate
The OpenID Connect (OIDC) configuration for a client application. This class is based on
org.keycloak.adapters.KeycloakDeployment.- Author:
- Bill Burke, Brad Culley, John D. Ament, Farah Juma
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected booleanprotected booleanprotected Callable<org.apache.http.client.HttpClient>protected ClientCredentialsProviderprotected Stringprotected intprotected booleanprotected Stringprotected Stringprotected Stringprotected intprotected booleanprotected booleanprotected org.wildfly.security.http.oidc.JWKEncPublicKeyLocatorprotected booleanprotected booleanprotected Stringprotected Stringprotected Stringprotected intprotected intprotected Stringprotected booleanprotected Stringprotected Stringprotected booleanprotected intprotected PublicKeyLocatorprotected Stringprotected Stringprotected booleanprotected intprotected Stringprotected OidcClientConfiguration.RelativeUrlsUsedprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected booleanprotected booleanprotected Stringprotected Stringprotected Oidc.SSLRequiredprotected Stringprotected intprotected Stringprotected Oidc.TokenStoreprotected Stringprotected booleanprotected Stringprotected booleanprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.client.HttpClientintintorg.wildfly.security.http.oidc.JWKEncPublicKeyLocatorintintprotected OidcProviderMetadatagetOidcProviderMetadata(String discoveryUrl) intgetRealm()intbooleanbooleangetScope()intbooleanbooleanbooleanbooleanbooleanisCors()booleanbooleanbooleanbooleanbooleanisPkce()booleanbooleanbooleanbooleanbooleanbooleanbooleanprotected voidResets all calculated urls to null and sets the relativeUrls field depending the value of the current discovery URL in the configuration.protected voidURLs are loaded lazily when used.protected voidresolveUrls(org.wildfly.security.http.oidc.OidcClientUriBuilder authUrlBuilder) voidsetAlwaysRefreshToken(boolean alwaysRefreshToken) voidsetAuthenticationRequestFormat(String authenticationRequestFormat) voidvoidsetAutodetectBearerOnly(boolean autodetectBearerOnly) voidsetBearerOnly(boolean bearerOnly) voidvoidsetClient(org.apache.http.client.HttpClient client) voidsetClientAuthenticator(ClientCredentialsProvider clientAuthenticator) voidsetClientId(String clientId) voidsetConfidentialPort(int confidentialPort) voidsetCors(boolean cors) voidsetCorsAllowedHeaders(String corsAllowedHeaders) voidsetCorsAllowedMethods(String corsAllowedMethods) voidsetCorsExposedHeaders(String corsExposedHeaders) voidsetCorsMaxAge(int corsMaxAge) voidsetDelegateBearerErrorResponseSending(boolean delegateBearerErrorResponseSending) voidsetEnableBasicAuth(boolean enableBasicAuth) voidsetEncryptionPublicKeyLocator(org.wildfly.security.http.oidc.JWKEncPublicKeyLocator publicKeySetExtractor) voidsetExposeToken(boolean exposeToken) voidsetIgnoreOAuthQueryParameter(boolean ignoreOAuthQueryParameter) voidsetMinTimeBetweenJwksRequests(int minTimeBetweenJwksRequests) voidsetNotBefore(int notBefore) voidsetOidcStateCookiePath(String oidcStateCookiePath) voidsetPkce(boolean pkce) voidsetPrincipalAttribute(String principalAttribute) voidsetProviderUrl(String providerUrl) voidsetPublicClient(boolean publicClient) voidsetPublicKeyCacheTtl(int publicKeyCacheTtl) voidsetPublicKeyLocator(PublicKeyLocator publicKeyLocator) voidsetPushedAuthorizationRequestEndpoint(String pushedAuthorizationRequestEndpoint) voidvoidsetRegisterNodeAtStartup(boolean registerNodeAtStartup) voidsetRegisterNodePeriod(int registerNodePeriod) voidsetRequestObjectEncryptionAlgValue(String requestObjectEncryptionAlgValue) voidsetRequestObjectEncryptionEncValue(String requestObjectEncryptionEncValue) voidsetRequestObjectSigningAlgorithm(String requestObjectSigningAlgorithm) voidsetRequestObjectSigningKeyAlias(String requestObjectSigningKeyAlias) voidsetRequestObjectSigningKeyPassword(String requestObjectSigningKeyPassword) voidsetRequestObjectSigningKeyStoreFile(String keyStoreFile) voidsetRequestObjectSigningKeyStorePassword(String requestObjectSigningKeyStorePassword) voidsetRequestObjectSigningKeyStoreType(String requestObjectSigningKeyStoreType) voidsetResource(String resource) voidsetResourceCredentials(Map<String, Object> resourceCredentials) voidsetRewriteRedirectRules(Map<String, String> redirectRewriteRules) voidvoidsetSSLRequired(Oidc.SSLRequired sslRequired) voidsetStateCookieName(String stateCookieName) voidsetTokenMinimumTimeToLive(int tokenMinimumTimeToLive) voidsetTokenSignatureAlgorithm(String tokenSignatureAlgorithm) voidsetTokenStore(Oidc.TokenStore tokenStore) voidsetTurnOffChangeSessionIdOnLogin(boolean turnOffChangeSessionIdOnLogin) voidsetUseRealmRoleMappings(boolean useRealmRoleMappings) voidsetUseResourceRoleMappings(boolean useResourceRoleMappings) voidsetVerifyTokenAudience(boolean verifyTokenAudience) voidupdateNotBefore(int notBefore)
-
Field Details
-
relativeUrls
-
realm
-
publicKeyLocator
-
authServerBaseUrl
-
providerUrl
-
authUrl
-
tokenUrl
-
logoutUrl
-
accountUrl
-
registerNodeUrl
-
unregisterNodeUrl
-
jwksUrl
-
issuerUrl
-
principalAttribute
-
requestObjectSigningAlgValuesSupported
-
requestObjectEncryptionEncValuesSupported
-
requestObjectEncryptionAlgValuesSupported
-
requestParameterSupported
protected boolean requestParameterSupported -
requestUriParameterSupported
protected boolean requestUriParameterSupported -
resource
-
clientId
-
bearerOnly
protected boolean bearerOnly -
autodetectBearerOnly
protected boolean autodetectBearerOnly -
enableBasicAuth
protected boolean enableBasicAuth -
publicClient
protected boolean publicClient -
resourceCredentials
-
clientAuthenticator
-
client
-
scope
-
sslRequired
-
confidentialPort
protected int confidentialPort -
tokenStore
-
oidcStateCookiePath
-
stateCookieName
-
useResourceRoleMappings
protected boolean useResourceRoleMappings -
useRealmRoleMappings
protected boolean useRealmRoleMappings -
cors
protected boolean cors -
corsMaxAge
protected int corsMaxAge -
corsAllowedHeaders
-
corsAllowedMethods
-
corsExposedHeaders
-
exposeToken
protected boolean exposeToken -
alwaysRefreshToken
protected boolean alwaysRefreshToken -
registerNodeAtStartup
protected boolean registerNodeAtStartup -
registerNodePeriod
protected int registerNodePeriod -
turnOffChangeSessionIdOnLogin
protected boolean turnOffChangeSessionIdOnLogin -
notBefore
protected volatile int notBefore -
tokenMinimumTimeToLive
protected int tokenMinimumTimeToLive -
minTimeBetweenJwksRequests
protected int minTimeBetweenJwksRequests -
publicKeyCacheTtl
protected int publicKeyCacheTtl -
pkce
protected boolean pkce -
ignoreOAuthQueryParameter
protected boolean ignoreOAuthQueryParameter -
redirectRewriteRules
-
delegateBearerErrorResponseSending
protected boolean delegateBearerErrorResponseSending -
verifyTokenAudience
protected boolean verifyTokenAudience -
tokenSignatureAlgorithm
-
authenticationRequestFormat
-
requestObjectSigningAlgorithm
-
requestObjectEncryptionAlgValue
-
requestObjectEncryptionEncValue
-
pushedAuthorizationRequestEndpoint
-
requestObjectSigningKeyStoreFile
-
requestObjectSigningKeyStorePassword
-
requestObjectSigningKeyPassword
-
requestObjectSigningKeyAlias
-
requestObjectSigningKeyStoreType
-
encryptionPublicKeyLocator
protected org.wildfly.security.http.oidc.JWKEncPublicKeyLocator encryptionPublicKeyLocator
-
-
Constructor Details
-
OidcClientConfiguration
public OidcClientConfiguration()
-
-
Method Details
-
isConfigured
public boolean isConfigured() -
getResourceName
-
getResource
-
getClientId
-
getRealm
-
setRealm
-
getPublicKeyLocator
-
setPublicKeyLocator
-
getAuthServerBaseUrl
-
setProviderUrl
-
setAuthServerBaseUrl
-
resetUrls
protected void resetUrls()Resets all calculated urls to null and sets the relativeUrls field depending the value of the current discovery URL in the configuration. If it is relative is set to ALWAYS and if absolute is set to NEVER. -
resolveUrls
protected void resolveUrls()URLs are loaded lazily when used. -
resolveUrls
protected void resolveUrls(org.wildfly.security.http.oidc.OidcClientUriBuilder authUrlBuilder) -
getOidcProviderMetadata
- Throws:
Exception
-
getRelativeUrls
-
getProviderUrl
-
getAuthUrl
-
getTokenUrl
-
getLogoutUrl
-
getAccountUrl
-
getRegisterNodeUrl
-
getUnregisterNodeUrl
-
getJwksUrl
-
getIssuerUrl
-
getRequestObjectSigningAlgValuesSupported
-
getRequestObjectEncryptionAlgValuesSupported
-
getRequestObjectEncryptionEncValuesSupported
-
getRequestParameterSupported
public boolean getRequestParameterSupported() -
getRequestUriParameterSupported
public boolean getRequestUriParameterSupported() -
setResource
-
setClientId
-
isBearerOnly
public boolean isBearerOnly() -
setBearerOnly
public void setBearerOnly(boolean bearerOnly) -
isAutodetectBearerOnly
public boolean isAutodetectBearerOnly() -
setAutodetectBearerOnly
public void setAutodetectBearerOnly(boolean autodetectBearerOnly) -
isEnableBasicAuth
public boolean isEnableBasicAuth() -
setEnableBasicAuth
public void setEnableBasicAuth(boolean enableBasicAuth) -
isPublicClient
public boolean isPublicClient() -
setPublicClient
public void setPublicClient(boolean publicClient) -
getResourceCredentials
-
setResourceCredentials
-
getClientAuthenticator
-
setClientAuthenticator
-
getClient
public org.apache.http.client.HttpClient getClient() -
setClient
public void setClient(org.apache.http.client.HttpClient client) -
getScope
-
setScope
-
getSSLRequired
-
setSSLRequired
-
isSSLEnabled
public boolean isSSLEnabled() -
getConfidentialPort
public int getConfidentialPort() -
setConfidentialPort
public void setConfidentialPort(int confidentialPort) -
getTokenStore
-
setTokenStore
-
getOidcStateCookiePath
-
setOidcStateCookiePath
-
getStateCookieName
-
setStateCookieName
-
isUseResourceRoleMappings
public boolean isUseResourceRoleMappings() -
setUseResourceRoleMappings
public void setUseResourceRoleMappings(boolean useResourceRoleMappings) -
isUseRealmRoleMappings
public boolean isUseRealmRoleMappings() -
setUseRealmRoleMappings
public void setUseRealmRoleMappings(boolean useRealmRoleMappings) -
isCors
public boolean isCors() -
setCors
public void setCors(boolean cors) -
getCorsMaxAge
public int getCorsMaxAge() -
setCorsMaxAge
public void setCorsMaxAge(int corsMaxAge) -
getCorsAllowedHeaders
-
setCorsAllowedHeaders
-
getCorsAllowedMethods
-
setCorsAllowedMethods
-
getCorsExposedHeaders
-
setCorsExposedHeaders
-
isExposeToken
public boolean isExposeToken() -
setExposeToken
public void setExposeToken(boolean exposeToken) -
getNotBefore
public int getNotBefore() -
setNotBefore
public void setNotBefore(int notBefore) -
updateNotBefore
public void updateNotBefore(int notBefore) -
isAlwaysRefreshToken
public boolean isAlwaysRefreshToken() -
setAlwaysRefreshToken
public void setAlwaysRefreshToken(boolean alwaysRefreshToken) -
isRegisterNodeAtStartup
public boolean isRegisterNodeAtStartup() -
setRegisterNodeAtStartup
public void setRegisterNodeAtStartup(boolean registerNodeAtStartup) -
getRegisterNodePeriod
public int getRegisterNodePeriod() -
setRegisterNodePeriod
public void setRegisterNodePeriod(int registerNodePeriod) -
getPrincipalAttribute
-
setPrincipalAttribute
-
isTurnOffChangeSessionIdOnLogin
public boolean isTurnOffChangeSessionIdOnLogin() -
setTurnOffChangeSessionIdOnLogin
public void setTurnOffChangeSessionIdOnLogin(boolean turnOffChangeSessionIdOnLogin) -
getTokenMinimumTimeToLive
public int getTokenMinimumTimeToLive() -
setTokenMinimumTimeToLive
public void setTokenMinimumTimeToLive(int tokenMinimumTimeToLive) -
getMinTimeBetweenJwksRequests
public int getMinTimeBetweenJwksRequests() -
setMinTimeBetweenJwksRequests
public void setMinTimeBetweenJwksRequests(int minTimeBetweenJwksRequests) -
getPublicKeyCacheTtl
public int getPublicKeyCacheTtl() -
setPublicKeyCacheTtl
public void setPublicKeyCacheTtl(int publicKeyCacheTtl) -
isPkce
public boolean isPkce() -
setPkce
public void setPkce(boolean pkce) -
setIgnoreOAuthQueryParameter
public void setIgnoreOAuthQueryParameter(boolean ignoreOAuthQueryParameter) -
isOAuthQueryParameterEnabled
public boolean isOAuthQueryParameterEnabled() -
getRedirectRewriteRules
-
setRewriteRedirectRules
-
isDelegateBearerErrorResponseSending
public boolean isDelegateBearerErrorResponseSending() -
setDelegateBearerErrorResponseSending
public void setDelegateBearerErrorResponseSending(boolean delegateBearerErrorResponseSending) -
isVerifyTokenAudience
public boolean isVerifyTokenAudience() -
setVerifyTokenAudience
public void setVerifyTokenAudience(boolean verifyTokenAudience) -
setClient
-
setTokenSignatureAlgorithm
-
getTokenSignatureAlgorithm
-
getAuthenticationRequestFormat
-
setAuthenticationRequestFormat
-
getRequestObjectSigningAlgorithm
-
setRequestObjectSigningAlgorithm
-
getRequestObjectEncryptionAlgValue
-
setRequestObjectEncryptionAlgValue
-
getRequestObjectEncryptionEncValue
-
setRequestObjectEncryptionEncValue
-
getRequestObjectSigningKeyStoreFile
-
setRequestObjectSigningKeyStoreFile
-
getRequestObjectSigningKeyStorePassword
-
setRequestObjectSigningKeyStorePassword
-
getRequestObjectSigningKeyPassword
-
setRequestObjectSigningKeyPassword
-
getRequestObjectSigningKeyStoreType
-
setRequestObjectSigningKeyStoreType
-
getRequestObjectSigningKeyAlias
-
setRequestObjectSigningKeyAlias
-
getPushedAuthorizationRequestEndpoint
-
setPushedAuthorizationRequestEndpoint
-
setEncryptionPublicKeyLocator
public void setEncryptionPublicKeyLocator(org.wildfly.security.http.oidc.JWKEncPublicKeyLocator publicKeySetExtractor) -
getEncryptionPublicKeyLocator
public org.wildfly.security.http.oidc.JWKEncPublicKeyLocator getEncryptionPublicKeyLocator()
-