Package com.okta.jwt.impl.jjwt
Class JjwtIdTokenVerifierBuilder
java.lang.Object
com.okta.jwt.impl.jjwt.JjwtIdTokenVerifierBuilder
- All Implemented Interfaces:
IdTokenVerifier.Builder,VerifierBuilderSupport<IdTokenVerifier.Builder,IdTokenVerifier>
Classes in this `impl` implementation package may change in NON backward compatible way, and should ONLY be used as
a "runtime" dependency.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs a JWT Verifier.booleanjava.time.ClockgetClock()java.time.DurationintintinthashCode()protected HttpClientprotected StringresolveKeysEndpoint(String issuer) protected IdTokenVerifier.Builderself()setClientId(String clientId) Sets theclienIdthe verifier will expect.setClock(java.time.Clock clock) Sets theclockthe verifier will use for evaluating token expiration.setConnectionTimeout(java.time.Duration connectionTimeout) Sets theconnectionTimeoutfor the verifier.Sets theissuerthe verifier will expect.setLeeway(java.time.Duration leeway) Sets theleewaythe verifier will allow.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(java.time.Duration retryMaxElapsed) Sets theretryMaxElapsedthe verifier will allow when making HTTP requests to the "keys" endpoint.protected io.jsonwebtoken.SigningKeyResolverprotected voidvalidate()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.okta.jwt.VerifierBuilderSupport
setClock, setConnectionTimeout, setIssuer, setLeeway, setProxyHost, setProxyPassword, setProxyPort, setProxyUsername, setRetryMaxAttempts, setRetryMaxElapsed
-
Constructor Details
-
JjwtIdTokenVerifierBuilder
public JjwtIdTokenVerifierBuilder()
-
-
Method Details
-
getClientId
-
setClientId
Description copied from interface:IdTokenVerifier.BuilderSets theclienIdthe verifier will expect.- Specified by:
setClientIdin interfaceIdTokenVerifier.Builder- Parameters:
clientId- Client Id- Returns:
- a reference to the current builder for use in method chaining
-
validate
protected void validate() -
build
Description copied from interface:VerifierBuilderSupportConstructs a JWT Verifier.- Specified by:
buildin interfaceVerifierBuilderSupport<IdTokenVerifier.Builder,IdTokenVerifier> - Returns:
- A JWT Verifier
-
setIssuer
Description copied from interface:VerifierBuilderSupportSets theissuerthe verifier will expect.- Specified by:
setIssuerin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
issuer- Issuer URL- Returns:
- a reference to the current builder for use in method chaining
-
setLeeway
Description copied from interface:VerifierBuilderSupportSets theleewaythe verifier will allow.- Specified by:
setLeewayin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
leeway- clock skew leeway- Returns:
- a reference to the current builder for use in method chaining
-
setConnectionTimeout
Description copied from interface:VerifierBuilderSupportSets theconnectionTimeoutfor the verifier.- Specified by:
setConnectionTimeoutin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
connectionTimeout- connection timeout- Returns:
- a reference to the current builder for use in method chaining
-
getProxyHost
-
setProxyHost
Description copied from interface:VerifierBuilderSupportSets the proxy host used for the configured HTTP proxy.- Specified by:
setProxyHostin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
proxyHost- the proxy host used for the configured HTTP proxy- Returns:
- a reference to the current builder for use in method chaining
-
getProxyPort
public int getProxyPort() -
setProxyPort
Description copied from interface:VerifierBuilderSupportSets the proxy port used for the configured HTTP proxy.- Specified by:
setProxyPortin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
proxyPort- the proxy port used for the configured HTTP proxy- Returns:
- a reference to the current builder for use in method chaining
-
getProxyUsername
-
setProxyUsername
Description copied from interface:VerifierBuilderSupportSets the proxy username used for the configured HTTP proxy.- Specified by:
setProxyUsernamein interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
proxyUsername- the proxy username used for the configured HTTP proxy- Returns:
- a reference to the current builder for use in method chaining
-
getProxyPassword
-
setProxyPassword
Description copied from interface:VerifierBuilderSupportSets the proxy password used for the configured HTTP proxy.- Specified by:
setProxyPasswordin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
proxyPassword- the proxy password used for the configured HTTP proxy- Returns:
- a reference to the current builder for use in method chaining
-
getRetryMaxAttempts
public int getRetryMaxAttempts() -
setRetryMaxAttempts
Description copied from interface:VerifierBuilderSupportSets theretryMaxAttemptsthe verifier will allow when making HTTP requests to the "keys" endpoint.- Specified by:
setRetryMaxAttemptsin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
retryMaxAttempts- The maximum number of times to retry HTTP requests- Returns:
- a reference to the current builder for use in method chaining
-
getMaxHttpRetryElapsed
public java.time.Duration getMaxHttpRetryElapsed() -
setRetryMaxElapsed
Description copied from interface:VerifierBuilderSupportSets theretryMaxElapsedthe verifier will allow when making HTTP requests to the "keys" endpoint.- Specified by:
setRetryMaxElapsedin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - Parameters:
retryMaxElapsed- the max duration for the total of HTTP request- Returns:
- a reference to the current builder for use in method chaining
-
getClock
public java.time.Clock getClock() -
setClock
Description copied from interface:VerifierBuilderSupportSets theclockthe verifier will use for evaluating token expiration.- Specified by:
setClockin interfaceVerifierBuilderSupport<B extends VerifierBuilderSupport,R> - 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
-
self
-
resolveKeysEndpoint
-
signingKeyResolver
protected io.jsonwebtoken.SigningKeyResolver signingKeyResolver() -
httpClient
-
equals
-
hashCode
public int hashCode()
-