Package com.okta.jwt
Interface VerifierBuilderSupport<B extends VerifierBuilderSupport,R>
- Type Parameters:
B- Builder used for method chainingR- JWT Verifier
- All Known Subinterfaces:
AccessTokenVerifier.Builder,IdTokenVerifier.Builder
- All Known Implementing Classes:
JjwtAccessTokenVerifierBuilder,JjwtIdTokenVerifierBuilder
public interface VerifierBuilderSupport<B extends VerifierBuilderSupport,R>
JWT Verifier Builder support class (defines common properties used for general JWT validation).
- Since:
- 0.4
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs a JWT Verifier.Sets theclockthe verifier will use for evaluating token expiration.setConnectionTimeout(Duration connectionTimeout) Sets theconnectionTimeoutfor the verifier.Sets theissuerthe verifier will expect.Sets theleewaythe verifier will allow.setPreloadSigningKeys(boolean preloadSigningKeys) Sets thepreloadSigningKeysthe verifier will use to determine if it needs to prefetch Signing keys into cache at boot time.setProxyHost(String proxyHost) Sets the proxy host used for the configured HTTP proxy.setProxyPassword(String proxyPassword) Sets the proxy password used for the configured HTTP proxy.setProxyPort(int proxyPort) Sets the proxy port used for the configured HTTP proxy.setProxyUsername(String proxyUsername) Sets the proxy username used for the configured HTTP proxy.setRetryMaxAttempts(int retryMaxAttempts) Sets theretryMaxAttemptsthe verifier will allow when making HTTP requests to the "keys" endpoint.setRetryMaxElapsed(Duration retryMaxElapsed) Sets theretryMaxElapsedthe verifier will allow when making HTTP requests to the "keys" endpoint.
-
Method Details
-
setIssuer
Sets theissuerthe verifier will expect.- Parameters:
issuer- Issuer URL- Returns:
- a reference to the current builder for use in method chaining
-
setLeeway
Sets theleewaythe verifier will allow.- Parameters:
leeway- clock skew leeway- Returns:
- a reference to the current builder for use in method chaining
-
setConnectionTimeout
Sets theconnectionTimeoutfor the verifier.- Parameters:
connectionTimeout- connection timeout- Returns:
- a reference to the current builder for use in method chaining
-
setProxyHost
Sets the proxy host used for the configured HTTP proxy.- Parameters:
proxyHost- the proxy host used for the configured HTTP proxy- Returns:
- a reference to the current builder for use in method chaining
-
setProxyPort
Sets the proxy port used for the configured HTTP proxy.- Parameters:
proxyPort- the proxy port used for the configured HTTP proxy- Returns:
- a reference to the current builder for use in method chaining
-
setProxyUsername
Sets the proxy username used for the configured HTTP proxy.- Parameters:
proxyUsername- the proxy username used for the configured HTTP proxy- Returns:
- a reference to the current builder for use in method chaining
-
setProxyPassword
Sets the proxy password used for the configured HTTP proxy.- Parameters:
proxyPassword- the proxy password used for the configured HTTP proxy- Returns:
- a reference to the current builder for use in method chaining
-
setRetryMaxAttempts
Sets theretryMaxAttemptsthe verifier will allow when making HTTP requests to the "keys" endpoint.- Parameters:
retryMaxAttempts- The maximum number of times to retry HTTP requests- Returns:
- a reference to the current builder for use in method chaining
-
setRetryMaxElapsed
Sets theretryMaxElapsedthe verifier will allow when making HTTP requests to the "keys" endpoint.- Parameters:
retryMaxElapsed- the max duration for the total of HTTP request- Returns:
- a reference to the current builder for use in method chaining
-
setClock
Sets theclockthe verifier will use for evaluating token expiration.- Parameters:
clock- specify an alternate clock, such as fixed or offset to be used during testing- Returns:
- a reference to the current builder for use in method chaining
-
setPreloadSigningKeys
Sets thepreloadSigningKeysthe verifier will use to determine if it needs to prefetch Signing keys into cache at boot time.- Parameters:
preloadSigningKeys- specify if we want to prefetch the signing keys from issuer's url at boot time- Returns:
- a reference to the current builder for use in method chaining
-
build
R build()Constructs a JWT Verifier.- Returns:
- A JWT Verifier
-