java.lang.Object
io.inverno.mod.security.jose.jwk.InMemoryJWKStore
- All Implemented Interfaces:
JWKStore
A JWKStore
implementation that stores and read JWK from concurrent maps in memory.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the key stored for the specified X.509 SHA1 thumbprintgetByJWKThumbprint
(String thumbprint) Returns the key stored for the specified JWK thumbprint.getByKeyId
(String kid) Returns the key stored for the specified key id.getByX509CertificateSHA256Thumbprint
(String x5t_S256) Returns the key stored for the specified X.509 SHA256 thumbprintRemoves the specified key from the store.Stores the specified key into the store.
-
Constructor Details
-
InMemoryJWKStore
public InMemoryJWKStore()
-
-
Method Details
-
getByKeyId
Description copied from interface:JWKStore
Returns the key stored for the specified key id.
- Specified by:
getByKeyId
in interfaceJWKStore
- Type Parameters:
T
- the expected type of the key- Parameters:
kid
- a key id- Returns:
- a single key publisher or an empty publisher
- Throws:
JWKStoreException
- if there was an error accessing the store
-
getBy509CertificateSHA1Thumbprint
public <T extends JWK> Mono<T> getBy509CertificateSHA1Thumbprint(String x5t) throws JWKStoreException Description copied from interface:JWKStore
Returns the key stored for the specified X.509 SHA1 thumbprint
- Specified by:
getBy509CertificateSHA1Thumbprint
in interfaceJWKStore
- Type Parameters:
T
- the expected type of the key- Parameters:
x5t
- an X.509 SHA1 thumbprint- Returns:
- a single key publisher or an empty publisher
- Throws:
JWKStoreException
- if there was an error accessing the store
-
getByX509CertificateSHA256Thumbprint
public <T extends JWK> Mono<T> getByX509CertificateSHA256Thumbprint(String x5t_S256) throws JWKStoreException Description copied from interface:JWKStore
Returns the key stored for the specified X.509 SHA256 thumbprint
- Specified by:
getByX509CertificateSHA256Thumbprint
in interfaceJWKStore
- Type Parameters:
T
- the expected type of the key- Parameters:
x5t_S256
- an X.509 SHA256 thumbprint- Returns:
- a single key publisher or an empty publisher
- Throws:
JWKStoreException
- if there was an error accessing the store
-
getByJWKThumbprint
Description copied from interface:JWKStore
Returns the key stored for the specified JWK thumbprint.
- Specified by:
getByJWKThumbprint
in interfaceJWKStore
- Type Parameters:
T
- the expected type of the key- Parameters:
thumbprint
- a JWK thumbprint- Returns:
- a single key publisher or an empty publisher
- Throws:
JWKStoreException
- if there was an error accessing the store
-
set
Description copied from interface:JWKStore
Stores the specified key into the store.
This method should store the key for all available identifiers: key id, X.509 SHA1 thumbprint, X.509 SHA256 thumbprint and JWK thumbprint.
- Specified by:
set
in interfaceJWKStore
- Parameters:
jwk
- the key to store- Returns:
- a single empty publisher that completes once the key has been stored
- Throws:
JWKStoreException
- if there was an error accessing the store
-
remove
Description copied from interface:JWKStore
Removes the specified key from the store.
This method should remove the key associated to all available identifiers: key id, X.509 SHA1 thumbprint, X.509 SHA256 thumbprint and JWK thumbprint.
- Specified by:
remove
in interfaceJWKStore
- Parameters:
jwk
- the key to remove- Returns:
- a single empty publisher that completes once the key has been removed
- Throws:
JWKStoreException
- if there was an error accessing the store
-