10Duke Java Core
|
Service interface to implement for providing public keys for JWT signature verification.
Public Member Functions | |
PublicKey | provideDefault () |
Provides the default signature verification key. | |
PublicKey | provide (String keyId) |
Provides a signature verification key by key id. | |
void | withDefaultKey (String keyId, PublicKey key) |
Stores a key by id and sets it as the default key. | |
void | addKey (String keyId, PublicKey key) |
Stores a key by id. | |
void | removeKey (String keyId) |
Removes a key by id. | |
int | countKeys () |
Returns the count of keys currently held by this instance. | |
boolean | supportsJwksUrlLoad () |
Returns flag that tells if this key provider supports loading token signing keys from a JWKS endpoint. | |
void | loadJwks (URI jwksUrl) |
Request this key provider to load token signing keys from a JWKS endpoint. | |
void tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.addKey | ( | String | keyId, |
PublicKey | key ) |
Stores a key by id.
keyId | Identifier of the key to store. |
key | The key to store. |
Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.
int tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.countKeys | ( | ) |
Returns the count of keys currently held by this instance.
Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.
void tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.loadJwks | ( | URI | jwksUrl | ) |
Request this key provider to load token signing keys from a JWKS endpoint.
NOTE: use supportsJwksUrlLoad()
first to check that loading keys is supported.
jwksUrl | The JWKS endpoint to load public keys from. |
Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.
PublicKey tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.provide | ( | String | keyId | ) |
Provides a signature verification key by key id.
keyId | The key id to lookup key with. |
Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.
PublicKey tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.provideDefault | ( | ) |
Provides the default signature verification key.
Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.
void tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.removeKey | ( | String | keyId | ) |
Removes a key by id.
keyId | Identifier of the key to store. |
Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.
boolean tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.supportsJwksUrlLoad | ( | ) |
Returns flag that tells if this key provider supports loading token signing keys from a JWKS endpoint.
Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.
void tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.withDefaultKey | ( | String | keyId, |
PublicKey | key ) |
Stores a key by id and sets it as the default key.
keyId | Identifier of the key to store. |
key | The key to store. |
Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.