10Duke Java Core
|
A AuthConfig
implementation that provides a stacked approach for supporting a multi-source configuration.
To define a stacked configuration instance that terminates the recursion use: the single argument constructor OR call only the fluent variant withPriorityConfig
without a further call to withFallbackConfig
.
Public Member Functions | |
AuthConfigWithFallback (final AuthConfig config, final AuthConfig fallback) | |
Creates a new instance with the given primary and fallback configuration objects. | |
AuthConfigWithFallback | withConfig (final AuthConfig config) |
AuthConfigWithFallback | withFallbackConfig (final AuthConfig config) |
Optional< String > | tokenPath () |
Directory path for storing token data, e.g.JSON Web Tokens (JWT's). Defaults to: "./local-config" .
| |
Optional< String > | publicKeyPath () |
Directory path for storing public keys.Defaults to: "./local-config" .
| |
Optional< URI > | idpOidcDiscoveryUrl () |
Used to retrieve the details of the Open ID Connect endpoints for the identity provider.Defaults to: empty (no URI configured).
| |
Optional< URI > | idpOauthAuthorizationUrl () |
Endpoint for Authorization Request in Authorization Code or Implicit Grant flows (may be omitted if idpOidcDiscoveryUrl() provides a valid value).Defaults to: empty (no URI configured).
| |
Optional< URI > | idpOauthDeviceCodeUrl () |
Endpoint for Device Authorization Request in Device Authorization Grant flow (may be omitted if idpOidcDiscoveryUrl() provides a valid value).Only required when Device Authorization Grant flow is being used. Defaults to: empty (no URI configured).
| |
Optional< URI > | idpOauthTokenUrl () |
Endpoint for Access Token Request or Device Access Token Request (may be omitted if idpOidcDiscoveryUrl() provides a valid value).Defaults to: empty (no URI configured).
| |
Optional< String > | idpOauthClientId () |
Application credentials for OAuth/Open ID Connect.Defaults to: empty (no client id configured).
| |
Optional< String > | idpOauthClientSecret () |
Application credentials for OAuth/Open ID Connect.Required for some OAuth flows or for some Identity Providers. Defaults to: empty (no client secret configured).
| |
Optional< String > | idpOauthScope () |
Scopes to include in the Access and ID tokens requested via Open ID Connect.Default value: "openid" .
| |
Optional< URI > | idpUserinfoUrl () |
Endpoint handling the UserInfo Request (may be omitted if idpOidcDiscoveryUrl() provides a valid value).Defaults to: empty (no URI configured).
| |
Optional< URI > | idpJwksUri () |
URL path to read public key used to verify JWTs received from Authorization Server authenticating Open ID Connect session.Defaults to: empty (no URI configured).
| |
Optional< URI > | authRedirectUri () |
Fully specified redirect URL to use for PKCE Flow Client.Note: the client application callback URL must be registered with the Authorization Server (Identity Provider). Defaults to: empty (no URI configured).
| |
Optional< String > | authRedirectPath () |
Path fragment for local redirect URL to use for PKCE Flow Client.This should be the path on http://localhost that the IDP will redirect to for successful authentication during the PKCE flow. Defaults to: /login/callback (interpreted as http://localhost/login/callback) . Note: the client application callback URL must be registered with the Authorization Server (Identity Provider). This fragment is ignored if auth_redirect_uri is specified.
| |
int | authRedirectPort () |
Local port number for PKCE Flow login callback redirect.Defaults to random port (denoted by port = 0).
| |
Optional< String > | authSuccessMessage () |
Path to file / resource containing response for successful login (see PKCE Flow Client implementation).Default value: empty (no resource path for the success message is configured).
| |
float | tokenRefreshLeewaySeconds () |
The number of seconds before expiry time that an ID Token or JWT will be automatically refreshed.Default value: 30 seconds.
| |
float | httpTimeoutSeconds () |
Timeout for HTTP requests.Defaults to DEFAULT_HTTP_TIMEOUT_SECONDS which equals 30.0 seconds. Timeout value must be greater than 0.
| |
Optional< String > | httpsProxy () |
Proxy to use for HTTPS requests.The proxy URL must define a hostname and port. The format, including scheme is: proxy://hostname:port . E.g. proxy://localhost:32008 . Defaults to empty (no proxy).
| |
![]() | |
AbstractConfigWithFallback (final C config, final C fallback) | |
Initializes a new instance of this class with the given configuration and fallback instances. | |
AbstractConfigWithFallback | withConfig (final C config) |
Sets the configuration instance to use as priority one. | |
AbstractConfigWithFallback | withFallbackConfig (final C config) |
Sets the configuration instance to use as a fallback. | |
![]() | |
![]() | |
![]() |
Additional Inherited Members | |
![]() | |
float | DEFAULT_TOKEN_REFRESH_LEEWAY_SECONDS = 30.0F |
Defines the default token expiration related refresh leeway in seconds. | |
![]() | |
float | DEFAULT_HTTP_TIMEOUT_SECONDS = 30.0F |
Defines the default HTTP connect, call, read and write timeout value in seconds. | |
tenduke.sdk.core.model.config.AuthConfigWithFallback.AuthConfigWithFallback | ( | final AuthConfig | config, |
final AuthConfig | fallback ) |
Creates a new instance with the given primary and fallback configuration objects.
config | The first level configuration instance. |
fallback | The fallback configuration to use if the first level configuration does not provide a value. |
Optional< String > tenduke.sdk.core.model.config.AuthConfigWithFallback.authRedirectPath | ( | ) |
Path fragment for local redirect URL to use for PKCE Flow Client.This should be the path on http://localhost
that the IDP will redirect to for successful authentication during the PKCE flow. Defaults to: /login/callback
(interpreted as http://localhost/login/callback)
. Note: the client application callback URL must be registered with the Authorization Server (Identity Provider). This fragment is ignored if auth_redirect_uri
is specified.
redirect_uri
.Implements tenduke.sdk.core.model.config.AuthConfig.
int tenduke.sdk.core.model.config.AuthConfigWithFallback.authRedirectPort | ( | ) |
Local port number for PKCE Flow login callback redirect.Defaults to random port (denoted by port = 0).
redirect_uri
value.Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< URI > tenduke.sdk.core.model.config.AuthConfigWithFallback.authRedirectUri | ( | ) |
Fully specified redirect URL to use for PKCE Flow Client.Note: the client application callback URL must be registered with the Authorization Server (Identity Provider). Defaults to: empty (no URI configured).
redirect_uri
.Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< String > tenduke.sdk.core.model.config.AuthConfigWithFallback.authSuccessMessage | ( | ) |
Path to file / resource containing response for successful login (see PKCE Flow Client implementation).Default value: empty (no resource path for the success message is configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< String > tenduke.sdk.core.model.config.AuthConfigWithFallback.httpsProxy | ( | ) |
Proxy to use for HTTPS requests.The proxy URL must define a hostname and port. The format, including scheme is: proxy://hostname:port
. E.g. proxy://localhost:32008
. Defaults to empty (no proxy).
Implements tenduke.sdk.core.model.config.HttpClientConfig.
float tenduke.sdk.core.model.config.AuthConfigWithFallback.httpTimeoutSeconds | ( | ) |
Timeout for HTTP requests.Defaults to DEFAULT_HTTP_TIMEOUT_SECONDS
which equals 30.0 seconds. Timeout value must be greater than 0.
Implements tenduke.sdk.core.model.config.HttpClientConfig.
Optional< URI > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpJwksUri | ( | ) |
URL path to read public key used to verify JWTs received from Authorization Server authenticating Open ID Connect session.Defaults to: empty (no URI configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< URI > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpOauthAuthorizationUrl | ( | ) |
Endpoint for Authorization Request in Authorization Code or Implicit Grant flows (may be omitted if idpOidcDiscoveryUrl()
provides a valid value).Defaults to: empty (no URI configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< String > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpOauthClientId | ( | ) |
Application credentials for OAuth/Open ID Connect.Defaults to: empty (no client id configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< String > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpOauthClientSecret | ( | ) |
Application credentials for OAuth/Open ID Connect.Required for some OAuth flows or for some Identity Providers. Defaults to: empty (no client secret configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< URI > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpOauthDeviceCodeUrl | ( | ) |
Endpoint for Device Authorization Request in Device Authorization Grant flow (may be omitted if idpOidcDiscoveryUrl()
provides a valid value).Only required when Device Authorization Grant flow is being used. Defaults to: empty (no URI configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< String > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpOauthScope | ( | ) |
Scopes to include in the Access and ID tokens requested via Open ID Connect.Default value: "openid"
.
"openid"
, which is also the default value.Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< URI > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpOauthTokenUrl | ( | ) |
Endpoint for Access Token Request or Device Access Token Request (may be omitted if idpOidcDiscoveryUrl()
provides a valid value).Defaults to: empty (no URI configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< URI > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpOidcDiscoveryUrl | ( | ) |
Used to retrieve the details of the Open ID Connect endpoints for the identity provider.Defaults to: empty (no URI configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< URI > tenduke.sdk.core.model.config.AuthConfigWithFallback.idpUserinfoUrl | ( | ) |
Endpoint handling the UserInfo Request (may be omitted if idpOidcDiscoveryUrl()
provides a valid value).Defaults to: empty (no URI configured).
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< String > tenduke.sdk.core.model.config.AuthConfigWithFallback.publicKeyPath | ( | ) |
Directory path for storing public keys.Defaults to: "./local-config"
.
Implements tenduke.sdk.core.model.config.AuthConfig.
Optional< String > tenduke.sdk.core.model.config.AuthConfigWithFallback.tokenPath | ( | ) |
Directory path for storing token data, e.g.JSON Web Tokens (JWT's). Defaults to: "./local-config"
.
Implements tenduke.sdk.core.model.config.AuthConfig.
float tenduke.sdk.core.model.config.AuthConfigWithFallback.tokenRefreshLeewaySeconds | ( | ) |
The number of seconds before expiry time that an ID Token or JWT will be automatically refreshed.Default value: 30 seconds.
DEFAULT_TOKEN_REFRESH_LEEWAY_SECONDS
.Implements tenduke.sdk.core.model.config.AuthConfig.