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 booleancheckAttributeEquality(String key, Object object, Object actualValue) protected KeyWrapperselectSigningKey(RealmModel realm) voidmust 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, waitMethods 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:CNonceHandlerused 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:
buildCNoncein 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:CNonceHandlermust verify the validity of a cNonce value that has been issued by theCNonceHandler.buildCNonce(List, Map)method.- Specified by:
verifyCNoncein 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
-