Class JwkTransformerFunction
java.lang.Object
se.swedenconnect.security.credential.nimbus.JwkTransformerFunction
- All Implemented Interfaces:
Function<PkiCredential,
JWK>
A function that transforms a
PkiCredential
into an JWK
.- Author:
- Martin Lindström
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Default implementation of the function that returns the JOSE algorithm (alg
property).static class
Default implementation of the function that returns the key id (JWTkid
property).static class
Default implementation of the function that returns a set ofKeyOperation
s for a credential.static final class
Default implementation of the function that returns theKeyUse
for a credential. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapply
(PkiCredential credential) Transforms the suppliedPkiCredential
into anJWK
.void
setAlgorithmFunction
(Function<PkiCredential, Algorithm> algorithmFunction) Assigns the function that returns the JOSE algorithm.void
setKeyIdFunction
(Function<PkiCredential, String> keyIdFunction) Assigns the function that returns the key ID property (JWKkid
property).void
setKeyOpsFunction
(Function<PkiCredential, Set<KeyOperation>> keyOpsFunction) Assigns the function that returns a set ofKeyOperation
s.void
setKeyUseFunction
(Function<PkiCredential, KeyUse> keyUseFunction) Assigns the function that returns the key use property (JWKuse
property).
-
Constructor Details
-
JwkTransformerFunction
public JwkTransformerFunction()
-
-
Method Details
-
apply
Transforms the suppliedPkiCredential
into anJWK
.- Specified by:
apply
in interfaceFunction<PkiCredential,
JWK>
-
setKeyIdFunction
Assigns the function that returns the key ID property (JWKkid
property).The default implementation is
JwkTransformerFunction.DefaultKeyIdFunction
.- Parameters:
keyIdFunction
- the function
-
setKeyUseFunction
Assigns the function that returns the key use property (JWKuse
property).The default implementation is
JwkTransformerFunction.DefaultKeyUseFunction
.- Parameters:
keyUseFunction
- the function
-
setKeyOpsFunction
Assigns the function that returns a set ofKeyOperation
s.The default implementation is
JwkTransformerFunction.DefaultKeyOpsFunction
.- Parameters:
keyOpsFunction
- the function
-
setAlgorithmFunction
Assigns the function that returns the JOSE algorithm.The default implementation is
JwkTransformerFunction.DefaultAlgorithmFunction
.- Parameters:
algorithmFunction
- the function
-