Package io.quarkus.oidc
Class OidcTenantConfig.Token
java.lang.Object
io.quarkus.oidc.OidcTenantConfig.Token
- All Implemented Interfaces:
OidcTenantConfig.Token
- Enclosing class:
- OidcTenantConfig
@Deprecated(since="3.18")
public static class OidcTenantConfig.Token
extends Object
implements OidcTenantConfig.Token
Deprecated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.Token age.booleanDeprecated.Allow the remote introspection of JWT tokens when no matching JWK key is available.booleanDeprecated.Allow the remote introspection of the opaque tokens.Deprecated.The expected audience `aud` claim value, which can be a string or an array of strings.Deprecated.HTTP Authorization header scheme.(package private) OidcTenantConfig.BindingDeprecated.Token binding optionsDeprecated.Token customizer name.Deprecated.Decryption key location.Deprecated.The forced JWK set refresh interval in minutes.Deprecated.Custom HTTP header that contains a bearer token.booleanDeprecated.Require that the token includes a `iat` (issued at) claim Set this property to `false` if your JWT token does not contain an `iat` (issued at) claim.Deprecated.The expected issuer `iss` claim value.Deprecated.Life span grace period in seconds.Deprecated.Name of the claim which contains a principal name.booleanDeprecated.Refresh expired authorization code flow ID or access tokens.Deprecated.The refresh token time skew, in seconds.Deprecated.A map of required claims and their expected values.booleanDeprecated.Require that JWT tokens are only introspected remotely.Deprecated.Required signature algorithm.booleanDeprecated.Require that the token includes a `sub` (subject) claim which is a unique and never reassigned identifier for the current user.Deprecated.Expected token typeDeprecated.Indirectly verify that the opaque (binary) access token is valid by using it to request UserInfo. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionage()Deprecated.Token age.booleanDeprecated.Allow the remote introspection of JWT tokens when no matching JWK key is available.booleanDeprecated.Allow the remote introspection of the opaque tokens.audience()Deprecated.The expected audience `aud` claim value, which can be a string or an array of strings.Deprecated.HTTP Authorization header scheme.binding()Deprecated.Token certificate binding options.Deprecated.Token customizer name.Deprecated.Decryption key location.Deprecated.The forced JWK set refresh interval in minutes.static OidcTenantConfig.TokenfromAudience(String... audience) Deprecated.static OidcTenantConfig.TokenfromIssuer(String issuer) Deprecated.getAge()Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.header()Deprecated.Custom HTTP header that contains a bearer token.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.Require that the token includes a `iat` (issued at) claim Set this property to `false` if your JWT token does not contain an `iat` (issued at) claim.issuer()Deprecated.The expected issuer `iss` claim value.Deprecated.Deprecated.Life span grace period in seconds.Deprecated.Name of the claim which contains a principal name.booleanDeprecated.Refresh expired authorization code flow ID or access tokens.Deprecated.The refresh token time skew, in seconds.Deprecated.A map of required claims and their expected values.booleanDeprecated.Require that JWT tokens are only introspected remotely.voidDeprecated.voidsetAllowJwtIntrospection(boolean allowJwtIntrospection) Deprecated.voidsetAllowOpaqueTokenIntrospection(boolean allowOpaqueTokenIntrospection) Deprecated.voidsetAudience(List<String> audience) Deprecated.voidsetAuthorizationScheme(String authorizationScheme) Deprecated.voidsetCustomizerName(String customizerName) Deprecated.voidsetDecryptionKeyLocation(String decryptionKeyLocation) Deprecated.voidsetForcedJwkRefreshInterval(Duration forcedJwkRefreshInterval) Deprecated.voidDeprecated.voidsetIssuedAtRequired(boolean issuedAtRequired) Deprecated.voidDeprecated.voidsetLifespanGrace(int lifespanGrace) Deprecated.voidsetPrincipalClaim(String principalClaim) Deprecated.voidsetRefreshExpired(boolean refreshExpired) Deprecated.voidsetRefreshTokenTimeSkew(Duration refreshTokenTimeSkew) Deprecated.voidsetRequiredClaims(Map<String, String> requiredClaims) Deprecated.voidsetRequireJwtIntrospectionOnly(boolean requireJwtIntrospectionOnly) Deprecated.voidsetSignatureAlgorithm(OidcTenantConfig.SignatureAlgorithm signatureAlgorithm) Deprecated.voidsetSubjectRequired(boolean subjectRequired) Deprecated.voidsetTokenType(String tokenType) Deprecated.voidsetVerifyAccessTokenWithUserInfo(boolean verify) Deprecated.Deprecated.Required signature algorithm.booleanDeprecated.Require that the token includes a `sub` (subject) claim which is a unique and never reassigned identifier for the current user.Deprecated.Expected token typeDeprecated.Indirectly verify that the opaque (binary) access token is valid by using it to request UserInfo.
-
Field Details
-
issuer
Deprecated.The expected issuer `iss` claim value. This property overrides the `issuer` property, which might be set in OpenId Connect provider's well-known configuration. If the `iss` claim value varies depending on the host, IP address, or tenant id of the provider, you can skip the issuer verification by setting this property to `any`, but it should be done only when other options (such as configuring the provider to use the fixed `iss` claim value) are not possible. -
audience
Deprecated.The expected audience `aud` claim value, which can be a string or an array of strings. Note the audience claim is verified for ID tokens by default. ID token audience must be equal to the value of `quarkus.oidc.client-id` property. Use this property to override the expected value if your OpenID Connect provider sets a different audience claim value in ID tokens. Set it to `any` if your provider does not set ID token audience` claim. Audience verification for access tokens is only done if this property is configured. -
subjectRequired
public boolean subjectRequiredDeprecated.Require that the token includes a `sub` (subject) claim which is a unique and never reassigned identifier for the current user. Note that if you enable this property and if UserInfo is also required, both the token and UserInfo `sub` claims must be present and match each other. -
requiredClaims
Deprecated.A map of required claims and their expected values. For example, `quarkus.oidc.token.required-claims.org_id = org_xyz` would require tokens to have the `org_id` claim to be present and set to `org_xyz`. Strings are the only supported types. Use SecurityIdentityAugmentor to verify claims of other types or complex claims. -
tokenType
Deprecated.Expected token type -
lifespanGrace
Deprecated.Life span grace period in seconds. When checking token expiry, current time is allowed to be later than token expiration time by at most the configured number of seconds. When checking token issuance, current time is allowed to be sooner than token issue time by at most the configured number of seconds. -
age
Deprecated.Token age. It allows for the number of seconds to be specified that must not elapse since the `iat` (issued at) time. A small leeway to account for clock skew which can be configured with `quarkus.oidc.token.lifespan-grace` to verify the token expiry time can also be used to verify the token age property. Note that setting this property does not relax the requirement that Bearer and Code Flow JWT tokens must have a valid (`exp`) expiry claim value. The only exception where setting this property relaxes the requirement is when a logout token is sent with a back-channel logout request since the current OpenId Connect Back-Channel specification does not explicitly require the logout tokens to contain an `exp` claim. However, even if the current logout token is allowed to have no `exp` claim, the `exp` claim is still verified if the logout token contains it. -
issuedAtRequired
public boolean issuedAtRequiredDeprecated.Require that the token includes a `iat` (issued at) claim Set this property to `false` if your JWT token does not contain an `iat` (issued at) claim. Note that ID token is always required to have an `iat` claim and therefore this property has no impact on the ID token verification process. -
principalClaim
Deprecated.Name of the claim which contains a principal name. By default, the `upn`, `preferred_username` and `sub` claims are checked. -
refreshExpired
public boolean refreshExpiredDeprecated.Refresh expired authorization code flow ID or access tokens. If this property is enabled, a refresh token request is performed if the authorization code ID or access token has expired and, if successful, the local session is updated with the new set of tokens. Otherwise, the local session is invalidated and the user redirected to the OpenID Provider to re-authenticate. In this case, the user might not be challenged again if the OIDC provider session is still active. For this option be effective the `authentication.session-age-extension` property should also be set to a nonzero value since the refresh token is currently kept in the user session. This option is valid only when the application is of typeOidcTenantConfig.ApplicationType.WEB_APP. This property is enabled if `quarkus.oidc.token.refresh-token-time-skew` is configured, you do not need to enable this property manually in this case. -
refreshTokenTimeSkew
Deprecated.The refresh token time skew, in seconds. If this property is enabled, the configured number of seconds is added to the current time when checking if the authorization code ID or access token should be refreshed. If the sum is greater than the authorization code ID or access token's expiration time, a refresh is going to happen. -
forcedJwkRefreshInterval
Deprecated.The forced JWK set refresh interval in minutes. -
header
Deprecated.Custom HTTP header that contains a bearer token. This option is valid only when the application is of typeOidcTenantConfig.ApplicationType.SERVICE. -
authorizationScheme
Deprecated.HTTP Authorization header scheme. -
signatureAlgorithm
Deprecated.Required signature algorithm. OIDC providers support many signature algorithms but if necessary you can restrict Quarkus application to accept tokens signed only using an algorithm configured with this property. -
decryptionKeyLocation
Deprecated.Decryption key location. JWT tokens can be inner-signed and encrypted by OpenId Connect providers. However, it is not always possible to remotely introspect such tokens because the providers might not control the private decryption keys. In such cases set this property to point to the file containing the decryption private key in PEM or JSON Web Key (JWK) format. If this property is not set and the `private_key_jwt` client authentication method is used, the private key used to sign the client authentication JWT tokens are also used to decrypt the encrypted ID tokens. -
allowJwtIntrospection
public boolean allowJwtIntrospectionDeprecated.Allow the remote introspection of JWT tokens when no matching JWK key is available. This property is set to `true` by default for backward-compatibility reasons. It is planned that this default value will be changed to `false` in an upcoming release. Also note this property is ignored if JWK endpoint URI is not available and introspecting the tokens is the only verification option. -
requireJwtIntrospectionOnly
public boolean requireJwtIntrospectionOnlyDeprecated.Require that JWT tokens are only introspected remotely. -
allowOpaqueTokenIntrospection
public boolean allowOpaqueTokenIntrospectionDeprecated.Allow the remote introspection of the opaque tokens. Set this property to `false` if only JWT tokens are expected. -
customizerName
Deprecated.Token customizer name. Allows to select a tenant specific token customizer as a named bean. Prefer usingTenantFeaturequalifier when registering customTokenCustomizer. Use this property only to refer to `TokenCustomizer` implementations provided by this extension. -
verifyAccessTokenWithUserInfo
Deprecated.Indirectly verify that the opaque (binary) access token is valid by using it to request UserInfo. Opaque access token is considered valid if the provider accepted this token and returned a valid UserInfo. You should only enable this option if the opaque access tokens must be accepted but OpenId Connect provider does not have a token introspection endpoint. This property has no effect when JWT tokens must be verified. -
binding
OidcTenantConfig.Binding bindingDeprecated.Token binding options
-
-
Constructor Details
-
Token
public Token()Deprecated.
-
-
Method Details
-
fromIssuer
Deprecated. -
fromAudience
Deprecated. -
isVerifyAccessTokenWithUserInfo
Deprecated. -
setVerifyAccessTokenWithUserInfo
public void setVerifyAccessTokenWithUserInfo(boolean verify) Deprecated. -
getIssuer
Deprecated. -
setIssuer
Deprecated. -
getHeader
Deprecated. -
setHeader
Deprecated. -
getAudience
Deprecated. -
setAudience
Deprecated. -
getLifespanGrace
Deprecated. -
setLifespanGrace
public void setLifespanGrace(int lifespanGrace) Deprecated. -
getPrincipalClaim
Deprecated. -
setPrincipalClaim
Deprecated. -
isRefreshExpired
public boolean isRefreshExpired()Deprecated. -
setRefreshExpired
public void setRefreshExpired(boolean refreshExpired) Deprecated. -
getForcedJwkRefreshInterval
Deprecated. -
setForcedJwkRefreshInterval
Deprecated. -
getTokenType
Deprecated. -
setTokenType
Deprecated. -
getRefreshTokenTimeSkew
Deprecated. -
setRefreshTokenTimeSkew
Deprecated. -
isAllowJwtIntrospection
public boolean isAllowJwtIntrospection()Deprecated. -
setAllowJwtIntrospection
public void setAllowJwtIntrospection(boolean allowJwtIntrospection) Deprecated. -
isAllowOpaqueTokenIntrospection
public boolean isAllowOpaqueTokenIntrospection()Deprecated. -
setAllowOpaqueTokenIntrospection
public void setAllowOpaqueTokenIntrospection(boolean allowOpaqueTokenIntrospection) Deprecated. -
getBinding
Deprecated. -
binding
Deprecated.Description copied from interface:OidcTenantConfig.TokenToken certificate binding options.- Specified by:
bindingin interfaceOidcTenantConfig.Token
-
getAge
Deprecated. -
setAge
Deprecated. -
isIssuedAtRequired
public boolean isIssuedAtRequired()Deprecated. -
setIssuedAtRequired
public void setIssuedAtRequired(boolean issuedAtRequired) Deprecated. -
getDecryptionKeyLocation
Deprecated. -
setDecryptionKeyLocation
Deprecated. -
getRequiredClaims
Deprecated. -
setRequiredClaims
Deprecated. -
isRequireJwtIntrospectionOnly
public boolean isRequireJwtIntrospectionOnly()Deprecated. -
setRequireJwtIntrospectionOnly
public void setRequireJwtIntrospectionOnly(boolean requireJwtIntrospectionOnly) Deprecated. -
getSignatureAlgorithm
Deprecated. -
setSignatureAlgorithm
Deprecated. -
getCustomizerName
Deprecated. -
setCustomizerName
Deprecated. -
isSubjectRequired
public boolean isSubjectRequired()Deprecated. -
setSubjectRequired
public void setSubjectRequired(boolean subjectRequired) Deprecated. -
getAuthorizationScheme
Deprecated. -
setAuthorizationScheme
Deprecated. -
issuer
Deprecated.Description copied from interface:OidcTenantConfig.TokenThe expected issuer `iss` claim value. This property overrides the `issuer` property, which might be set in OpenId Connect provider's well-known configuration. If the `iss` claim value varies depending on the host, IP address, or tenant id of the provider, you can skip the issuer verification by setting this property to `any`, but it should be done only when other options (such as configuring the provider to use the fixed `iss` claim value) are not possible.- Specified by:
issuerin interfaceOidcTenantConfig.Token
-
audience
Deprecated.Description copied from interface:OidcTenantConfig.TokenThe expected audience `aud` claim value, which can be a string or an array of strings. Note the audience claim is verified for ID tokens by default. ID token audience must be equal to the value of `quarkus.oidc.client-id` property. Use this property to override the expected value if your OpenID Connect provider sets a different audience claim value in ID tokens. Set it to `any` if your provider does not set ID token audience` claim. Audience verification for access tokens is only done if this property is configured.- Specified by:
audiencein interfaceOidcTenantConfig.Token
-
subjectRequired
public boolean subjectRequired()Deprecated.Description copied from interface:OidcTenantConfig.TokenRequire that the token includes a `sub` (subject) claim which is a unique and never reassigned identifier for the current user. Note that if you enable this property and if UserInfo is also required, both the token and UserInfo `sub` claims must be present and match each other.- Specified by:
subjectRequiredin interfaceOidcTenantConfig.Token
-
requiredClaims
Deprecated.Description copied from interface:OidcTenantConfig.TokenA map of required claims and their expected values. For example, `quarkus.oidc.token.required-claims.org_id = org_xyz` would require tokens to have the `org_id` claim to be present and set to `org_xyz`. Strings are the only supported types. Use SecurityIdentityAugmentor to verify claims of other types or complex claims.- Specified by:
requiredClaimsin interfaceOidcTenantConfig.Token
-
tokenType
Deprecated.Description copied from interface:OidcTenantConfig.TokenExpected token type- Specified by:
tokenTypein interfaceOidcTenantConfig.Token
-
lifespanGrace
Deprecated.Description copied from interface:OidcTenantConfig.TokenLife span grace period in seconds. When checking token expiry, current time is allowed to be later than token expiration time by at most the configured number of seconds. When checking token issuance, current time is allowed to be sooner than token issue time by at most the configured number of seconds.- Specified by:
lifespanGracein interfaceOidcTenantConfig.Token
-
age
Deprecated.Description copied from interface:OidcTenantConfig.TokenToken age. It allows for the number of seconds to be specified that must not elapse since the `iat` (issued at) time. A small leeway to account for clock skew which can be configured with `quarkus.oidc.token.lifespan-grace` to verify the token expiry time can also be used to verify the token age property. Note that setting this property does not relax the requirement that Bearer and Code Flow JWT tokens must have a valid (`exp`) expiry claim value. The only exception where setting this property relaxes the requirement is when a logout token is sent with a back-channel logout request since the current OpenId Connect Back-Channel specification does not explicitly require the logout tokens to contain an `exp` claim. However, even if the current logout token is allowed to have no `exp` claim, the `exp` claim is still verified if the logout token contains it.- Specified by:
agein interfaceOidcTenantConfig.Token
-
issuedAtRequired
public boolean issuedAtRequired()Deprecated.Description copied from interface:OidcTenantConfig.TokenRequire that the token includes a `iat` (issued at) claim Set this property to `false` if your JWT token does not contain an `iat` (issued at) claim. Note that ID token is always required to have an `iat` claim and therefore this property has no impact on the ID token verification process.- Specified by:
issuedAtRequiredin interfaceOidcTenantConfig.Token
-
principalClaim
Deprecated.Description copied from interface:OidcTenantConfig.TokenName of the claim which contains a principal name. By default, the `upn`, `preferred_username` and `sub` claims are checked.- Specified by:
principalClaimin interfaceOidcTenantConfig.Token
-
refreshExpired
public boolean refreshExpired()Deprecated.Description copied from interface:OidcTenantConfig.TokenRefresh expired authorization code flow ID or access tokens. If this property is enabled, a refresh token request is performed if the authorization code ID or access token has expired and, if successful, the local session is updated with the new set of tokens. Otherwise, the local session is invalidated and the user redirected to the OpenID Provider to re-authenticate. In this case, the user might not be challenged again if the OIDC provider session is still active. For this option be effective the `authentication.session-age-extension` property should also be set to a nonzero value since the refresh token is currently kept in the user session. This option is valid only when the application is of typeOidcTenantConfig.ApplicationType.WEB_APP. This property is enabled if `quarkus.oidc.token.refresh-token-time-skew` is configured, you do not need to enable this property manually in this case.- Specified by:
refreshExpiredin interfaceOidcTenantConfig.Token
-
refreshTokenTimeSkew
Deprecated.Description copied from interface:OidcTenantConfig.TokenThe refresh token time skew, in seconds. If this property is enabled, the configured number of seconds is added to the current time when checking if the authorization code ID or access token should be refreshed. If the sum is greater than the authorization code ID or access token's expiration time, a refresh is going to happen.- Specified by:
refreshTokenTimeSkewin interfaceOidcTenantConfig.Token
-
forcedJwkRefreshInterval
Deprecated.Description copied from interface:OidcTenantConfig.TokenThe forced JWK set refresh interval in minutes.- Specified by:
forcedJwkRefreshIntervalin interfaceOidcTenantConfig.Token
-
header
Deprecated.Description copied from interface:OidcTenantConfig.TokenCustom HTTP header that contains a bearer token. This option is valid only when the application is of typeOidcTenantConfig.ApplicationType.SERVICE.- Specified by:
headerin interfaceOidcTenantConfig.Token
-
authorizationScheme
Deprecated.Description copied from interface:OidcTenantConfig.TokenHTTP Authorization header scheme.- Specified by:
authorizationSchemein interfaceOidcTenantConfig.Token
-
signatureAlgorithm
Deprecated.Description copied from interface:OidcTenantConfig.TokenRequired signature algorithm. OIDC providers support many signature algorithms but if necessary you can restrict Quarkus application to accept tokens signed only using an algorithm configured with this property.- Specified by:
signatureAlgorithmin interfaceOidcTenantConfig.Token
-
decryptionKeyLocation
Deprecated.Description copied from interface:OidcTenantConfig.TokenDecryption key location. JWT tokens can be inner-signed and encrypted by OpenId Connect providers. However, it is not always possible to remotely introspect such tokens because the providers might not control the private decryption keys. In such cases set this property to point to the file containing the decryption private key in PEM or JSON Web Key (JWK) format. If this property is not set and the `private_key_jwt` client authentication method is used, the private key used to sign the client authentication JWT tokens are also used to decrypt the encrypted ID tokens.- Specified by:
decryptionKeyLocationin interfaceOidcTenantConfig.Token
-
allowJwtIntrospection
public boolean allowJwtIntrospection()Deprecated.Description copied from interface:OidcTenantConfig.TokenAllow the remote introspection of JWT tokens when no matching JWK key is available. This property is set to `true` by default for backward-compatibility reasons. It is planned that this default value will be changed to `false` in an upcoming release. Also note this property is ignored if JWK endpoint URI is not available and introspecting the tokens is the only verification option.- Specified by:
allowJwtIntrospectionin interfaceOidcTenantConfig.Token
-
requireJwtIntrospectionOnly
public boolean requireJwtIntrospectionOnly()Deprecated.Description copied from interface:OidcTenantConfig.TokenRequire that JWT tokens are only introspected remotely.- Specified by:
requireJwtIntrospectionOnlyin interfaceOidcTenantConfig.Token
-
allowOpaqueTokenIntrospection
public boolean allowOpaqueTokenIntrospection()Deprecated.Description copied from interface:OidcTenantConfig.TokenAllow the remote introspection of the opaque tokens. Set this property to `false` if only JWT tokens are expected.- Specified by:
allowOpaqueTokenIntrospectionin interfaceOidcTenantConfig.Token
-
customizerName
Deprecated.Description copied from interface:OidcTenantConfig.TokenToken customizer name. Allows to select a tenant specific token customizer as a named bean. Prefer usingTenantFeaturequalifier when registering customTokenCustomizer. Use this property only to refer to `TokenCustomizer` implementations provided by this extension.- Specified by:
customizerNamein interfaceOidcTenantConfig.Token
-
verifyAccessTokenWithUserInfo
Deprecated.Description copied from interface:OidcTenantConfig.TokenIndirectly verify that the opaque (binary) access token is valid by using it to request UserInfo. Opaque access token is considered valid if the provider accepted this token and returned a valid UserInfo. You should only enable this option if the opaque access tokens must be accepted but OpenId Connect provider does not have a token introspection endpoint. This property has no effect when JWT tokens must be verified.- Specified by:
verifyAccessTokenWithUserInfoin interfaceOidcTenantConfig.Token
-
TokenConfigBuilderbuilder