10Duke Java Core
Loading...
Searching...
No Matches
tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider Interface Reference

Detailed Description

Service interface to implement for providing public keys for JWT signature verification.

Inheritance diagram for tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider:
tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider

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.
 

Member Function Documentation

◆ addKey()

void tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.addKey ( String keyId,
PublicKey key )

Stores a key by id.

Parameters
keyIdIdentifier of the key to store.
keyThe key to store.

Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.

◆ countKeys()

int tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.countKeys ( )

Returns the count of keys currently held by this instance.

Returns
Current key count.

Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.

◆ loadJwks()

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.

Parameters
jwksUrlThe JWKS endpoint to load public keys from.

Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.

◆ provide()

PublicKey tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.provide ( String keyId)

Provides a signature verification key by key id.

Parameters
keyIdThe key id to lookup key with.
Returns
verification key, or null if not found by key id.

Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.

◆ provideDefault()

PublicKey tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.provideDefault ( )

Provides the default signature verification key.

Returns
default signature verification key, must not be null.

Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.

◆ removeKey()

void tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.removeKey ( String keyId)

Removes a key by id.

Parameters
keyIdIdentifier of the key to store.

Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.

◆ supportsJwksUrlLoad()

boolean tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.supportsJwksUrlLoad ( )

Returns flag that tells if this key provider supports loading token signing keys from a JWKS endpoint.

Returns
true if loading keys from JWKS endpoint is supported, false otherwise.

Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.

◆ withDefaultKey()

void tenduke.sdk.core.service.JwtSignatureVerifierKeyProvider.withDefaultKey ( String keyId,
PublicKey key )

Stores a key by id and sets it as the default key.

Parameters
keyIdIdentifier of the key to store.
keyThe key to store.

Implemented in tenduke.sdk.core.service.impl.DefaultJwtSignatureVerifierKeyProvider.


The documentation for this interface was generated from the following file: