public class JwkProviderBuilder extends Object
| Constructor and Description |
|---|
JwkProviderBuilder(String domain)
Creates a new Builder with a URL from where to load the jwks.
|
| Modifier and Type | Method and Description |
|---|---|
JwkProvider |
build()
Creates a
JwkProvider |
JwkProviderBuilder |
cached(boolean cached)
Toggle the cache of Jwk.
|
JwkProviderBuilder |
cached(long cacheSize,
long expiresIn,
TimeUnit unit)
Enable the cache specifying size and expire time.
|
JwkProviderBuilder |
rateLimited(boolean rateLimited)
Toggle the rate limit of Jwk.
|
JwkProviderBuilder |
rateLimited(long bucketSize,
long refillRate,
TimeUnit unit)
Enable the cache specifying size and expire time.
|
public JwkProviderBuilder(String domain)
domain - from where to load the jwkspublic JwkProviderBuilder cached(boolean cached)
cached - if the provider should cache jwkspublic JwkProviderBuilder cached(long cacheSize, long expiresIn, TimeUnit unit)
cacheSize - number of jwk to cacheexpiresIn - amount of time the jwk will be cachedunit - unit of time for the expire of jwkpublic JwkProviderBuilder rateLimited(boolean rateLimited)
rateLimited - if the provider should rate limit jwkspublic JwkProviderBuilder rateLimited(long bucketSize, long refillRate, TimeUnit unit)
bucketSize - max number of jwks to deliver in the given rate.refillRate - amount of time to wait before a jwk can the jwk will be cachedunit - unit of time for the expire of jwkpublic JwkProvider build()
JwkProviderJwkProviderCopyright © 2016. All Rights Reserved.