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 for.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.booleandiscoveryEnabledEnables OIDC discovery.OidcCommonConfig.ProxyproxyOptions to configure a proxy that OIDC adapter will use for talking with OIDC server.OidcCommonConfig.TlstlsTLS configurationsOptional<String>tokenPathRelative path of the OIDC token endpoint which issues access and refresh tokens using either 'client_credentials' or 'password' grants
-
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()OidcCommonConfig.ProxygetProxy()Optional<String>getTokenPath()booleanisDiscoveryEnabled()voidsetAuthServerUrl(String authServerUrl)voidsetClientId(String clientId)voidsetConnectionDelay(Duration connectionDelay)voidsetConnectionTimeout(Duration connectionTimeout)voidsetCredentials(OidcCommonConfig.Credentials credentials)voidsetDiscoveryEnabled(boolean enabled)voidsetProxy(OidcCommonConfig.Proxy proxy)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/auth/realms/{realm}` where `{realm}` has to be replaced by the name of the Keycloak realm.
-
discoveryEnabled
@ConfigItem(defaultValue="true") public boolean discoveryEnabled
Enables OIDC discovery. If the discovery is disabled then the 'token-path' property must be configured.
-
tokenPath
@ConfigItem public Optional<String> tokenPath
Relative path of the OIDC token endpoint which issues access and refresh tokens using either 'client_credentials' or 'password' grants
-
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 for. Note this property is different to the `connection-delay` property which is only effective during the initial OIDC connection creation. This property is used to try to recover the existing connection which 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 for a 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.
-
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)
-
setClientId
public void setClientId(String clientId)
-
getCredentials
public OidcCommonConfig.Credentials getCredentials()
-
setCredentials
public void setCredentials(OidcCommonConfig.Credentials credentials)
-
isDiscoveryEnabled
public boolean isDiscoveryEnabled()
-
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)
-
-