Class JwtCNonceHandler
java.lang.Object
org.keycloak.protocol.oid4vc.issuance.keybinding.JwtCNonceHandler
- All Implemented Interfaces:
CNonceHandler
,Provider
- Author:
- Pascal Knüppel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionused to build a cNonce in any style.protected boolean
checkAttributeEquality
(String key, Object object, Object actualValue) protected KeyWrapper
selectSigningKey
(RealmModel realm) void
must verify the validity of a cNonce value that has been issued by theCNonceHandler.buildCNonce(List, Map)
method.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.protocol.oid4vc.issuance.keybinding.CNonceHandler
close
-
Field Details
-
SOURCE_ENDPOINT
- See Also:
-
NONCE_DEFAULT_LENGTH
public static final int NONCE_DEFAULT_LENGTH- See Also:
-
NONCE_LENGTH_RANDOM_OFFSET
public static final int NONCE_LENGTH_RANDOM_OFFSET- See Also:
-
-
Constructor Details
-
JwtCNonceHandler
-
-
Method Details
-
buildCNonce
Description copied from interface:CNonceHandler
used to build a cNonce in any style. For jwt-based cNonces we will additionally require the audience-values that should be added into the cNonce- Specified by:
buildCNonce
in interfaceCNonceHandler
- Parameters:
audiences
- the audiences for jwt-based cNoncesadditionalDetails
- additional attributes that might be required to build the cNonce and that are handler specific- Returns:
- the cNonce in string representation
-
verifyCNonce
public void verifyCNonce(String cNonce, List<String> audiences, @Nullable Map<String, Object> additionalDetails) throws VerificationExceptionDescription copied from interface:CNonceHandler
must verify the validity of a cNonce value that has been issued by theCNonceHandler.buildCNonce(List, Map)
method.- Specified by:
verifyCNonce
in interfaceCNonceHandler
- Parameters:
cNonce
- the cNonce to validateaudiences
- the expected audiences for jwt-based cNoncesadditionalDetails
- additional attributes that might be required to build the cNonce and that are handler specific- Throws:
VerificationException
-
checkAttributeEquality
protected boolean checkAttributeEquality(String key, Object object, Object actualValue) throws VerificationException - Throws:
VerificationException
-
selectSigningKey
-