Class IdTokenValidatorAdapter.Builder
java.lang.Object
org.apache.juneau.rest.server.auth.oidc.rp.IdTokenValidatorAdapter.Builder
- Enclosing class:
- IdTokenValidatorAdapter
Builder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalgorithms(com.nimbusds.jose.JWSAlgorithm... values) Sets the signing-algorithm allowlist.build()Builds the adapter.Sets the OAuth client id (expectedaud).Sets the expectediss(issuer).jwkSet(com.nimbusds.jose.jwk.JWKSet value) Sets a fixed JWK set (useful for tests / static keys).jwkSource(com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> value) Sets a customJWKSource.Sets the JWKS endpoint URI the validator fetches signing keys from.maxClockSkewSeconds(int value) Sets the clock-skew tolerance (in seconds) forexp/iatvalidation.
-
Constructor Details
-
Builder
protected Builder()Constructor.
-
-
Method Details
-
issuer
Sets the expectediss(issuer). Required.- Parameters:
value- The issuer. Must not benull or blank.- Returns:
- This object.
-
clientId
Sets the OAuth client id (expectedaud). Required.- Parameters:
value- The client id. Must not benull or blank.- Returns:
- This object.
-
jwksUri
Sets the JWKS endpoint URI the validator fetches signing keys from. Mutually exclusive withjwkSet(JWKSet)/jwkSource(JWKSource).The URI must use
"https" or target a loopback host; the signing-key material fetched from this endpoint is the trust anchor for every ID token, so a plaintext transport to a non-loopback host is rejected.- Parameters:
value- The JWKS URI. Must not benull and must use HTTPS or target a loopback host.- Returns:
- This object.
-
jwkSet
Sets a fixed JWK set (useful for tests / static keys). Mutually exclusive withjwksUri(URI)/jwkSource(JWKSource).- Parameters:
value- The JWK set. Must not benull .- Returns:
- This object.
-
jwkSource
public IdTokenValidatorAdapter.Builder jwkSource(com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> value) - Parameters:
value- The JWK source. Must not benull .- Returns:
- This object.
-
algorithms
Sets the signing-algorithm allowlist. Replaces the default[RS256, ES256].- Parameters:
values- The allowed algorithms. Must be non-empty and must not containAlgorithm.NONE.- Returns:
- This object.
-
maxClockSkewSeconds
Sets the clock-skew tolerance (in seconds) forexp/iatvalidation.- Parameters:
value- The tolerance in seconds. Must be non-negative.- Returns:
- This object.
-
build
Builds the adapter.- Returns:
- A new
IdTokenValidatorAdapter.
-