Package io.quarkus.oidc.common.runtime
Class OidcCommonConfig
- java.lang.Object
-
- io.quarkus.oidc.common.runtime.OidcCommonConfig
-
public class OidcCommonConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOidcCommonConfig.Credentialsstatic classOidcCommonConfig.Proxystatic classOidcCommonConfig.Tls
-
Field Summary
Fields Modifier and Type Field Description Optional<String>authServerUrlThe base URL of the OpenID Connect (OIDC) server, for example, `https://host:port/auth`.Optional<String>clientIdThe client-id of the application.Optional<Duration>connectionDelayThe maximum amount of time connecting to the currently unavailable OIDC server will be attempted for.intconnectionRetryCountThe number of times an attempt to re-establish an already available connection will be repeated.DurationconnectionTimeoutThe amount of time after which the current OIDC connection request will time out.OidcCommonConfig.CredentialscredentialsCredentials which the OIDC adapter will use to authenticate to the OIDC server.Optional<Boolean>discoveryEnabledEnables OIDC discovery.OptionalIntmaxPoolSizeThe maximum size of the connection pool used by the WebClientOidcCommonConfig.ProxyproxyOptions to configure a proxy that OIDC adapter will use for talking with OIDC server.Optional<String>revokePathRelative path or absolute URL of the OIDC token revocation endpoint.OidcCommonConfig.TlstlsTLS configurationsOptional<String>tokenPathRelative path or absolute URL of the OIDC token endpoint which issues access and refresh tokens.
-
Constructor Summary
Constructors Constructor Description OidcCommonConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>getAuthServerUrl()Optional<String>getClientId()Optional<Duration>getConnectionDelay()DurationgetConnectionTimeout()OidcCommonConfig.CredentialsgetCredentials()OptionalIntgetMaxPoolSize()OidcCommonConfig.ProxygetProxy()Optional<String>getRevokePath()Optional<String>getTokenPath()Optional<Boolean>isDiscoveryEnabled()voidsetAuthServerUrl(String authServerUrl)voidsetClientId(String clientId)voidsetConnectionDelay(Duration connectionDelay)voidsetConnectionTimeout(Duration connectionTimeout)voidsetCredentials(OidcCommonConfig.Credentials credentials)voidsetDiscoveryEnabled(boolean enabled)voidsetMaxPoolSize(int maxPoolSize)voidsetProxy(OidcCommonConfig.Proxy proxy)voidsetRevokePath(String revokePath)voidsetTokenPath(String tokenPath)
-
-
-
Field Detail
-
authServerUrl
@ConfigItem public Optional<String> authServerUrl
The base URL of the OpenID Connect (OIDC) server, for example, `https://host:port/auth`. OIDC discovery endpoint will be called by default by appending a '.well-known/openid-configuration' path to this URL. Note if you work with Keycloak OIDC server, make sure the base URL is in the following format: `https://host:port/realms/{realm}` where `{realm}` has to be replaced by the name of the Keycloak realm.
-
discoveryEnabled
@ConfigItem(defaultValueDocumentation="true") public Optional<Boolean> discoveryEnabled
Enables OIDC discovery. If the discovery is disabled then the OIDC endpoint URLs must be configured individually.
-
tokenPath
@ConfigItem public Optional<String> tokenPath
Relative path or absolute URL of the OIDC token endpoint which issues access and refresh tokens.
-
revokePath
@ConfigItem public Optional<String> revokePath
Relative path or absolute URL of the OIDC token revocation endpoint.
-
clientId
@ConfigItem public Optional<String> clientId
The client-id of the application. Each application has a client-id that is used to identify the application
-
connectionDelay
@ConfigItem public Optional<Duration> connectionDelay
The maximum amount of time connecting to the currently unavailable OIDC server will be attempted for. The number of times the connection request will be repeated is calculated by dividing the value of this property by 2. For example, setting it to `20S` will allow for requesting the connection up to 10 times with a 2 seconds delay between the retries. Note this property is only effective when the initial OIDC connection is created, for example, when requesting a well-known OIDC configuration. Use the 'connection-retry-count' property to support trying to re-establish an already available connection which may have been dropped.
-
connectionRetryCount
@ConfigItem(defaultValue="3") public int connectionRetryCount
The number of times an attempt to re-establish an already available connection will be repeated. Note this property is different from the `connection-delay` property, which is only effective during the initial OIDC connection creation. This property is used to try to recover an existing connection that may have been temporarily lost. For example, if a request to the OIDC token endpoint fails due to a connection exception, then the request will be retried the number of times configured by this property.
-
connectionTimeout
@ConfigItem(defaultValue="10s") public Duration connectionTimeout
The amount of time after which the current OIDC connection request will time out.
-
maxPoolSize
@ConfigItem public OptionalInt maxPoolSize
The maximum size of the connection pool used by the WebClient
-
credentials
@ConfigItem public OidcCommonConfig.Credentials credentials
Credentials which the OIDC adapter will use to authenticate to the OIDC server.
-
proxy
@ConfigItem public OidcCommonConfig.Proxy proxy
Options to configure a proxy that OIDC adapter will use for talking with OIDC server.
-
tls
@ConfigItem public OidcCommonConfig.Tls tls
TLS configurations
-
-
Method Detail
-
setConnectionDelay
public void setConnectionDelay(Duration connectionDelay)
-
setAuthServerUrl
public void setAuthServerUrl(String authServerUrl)
-
setTokenPath
public void setTokenPath(String tokenPath)
-
setRevokePath
public void setRevokePath(String revokePath)
-
setClientId
public void setClientId(String clientId)
-
getCredentials
public OidcCommonConfig.Credentials getCredentials()
-
setCredentials
public void setCredentials(OidcCommonConfig.Credentials credentials)
-
setDiscoveryEnabled
public void setDiscoveryEnabled(boolean enabled)
-
getProxy
public OidcCommonConfig.Proxy getProxy()
-
setProxy
public void setProxy(OidcCommonConfig.Proxy proxy)
-
getConnectionTimeout
public Duration getConnectionTimeout()
-
setConnectionTimeout
public void setConnectionTimeout(Duration connectionTimeout)
-
getMaxPoolSize
public OptionalInt getMaxPoolSize()
-
setMaxPoolSize
public void setMaxPoolSize(int maxPoolSize)
-
-