Class AbstractCredentialSigner<T>

java.lang.Object
org.keycloak.protocol.oid4vc.issuance.signing.AbstractCredentialSigner<T>
All Implemented Interfaces:
CredentialSigner<T>, Provider
Direct Known Subclasses:
JwtCredentialSigner, LDCredentialSigner, SdJwtCredentialSigner

public abstract class AbstractCredentialSigner<T> extends Object implements CredentialSigner<T>
  • Field Details

  • Constructor Details

    • AbstractCredentialSigner

      protected AbstractCredentialSigner(KeycloakSession keycloakSession)
  • Method Details

    • getSigner

      protected SignatureSignerContext getSigner(CredentialBuildConfig credentialBuildConfig)
      Reconstruct a signer matching a credential build configuration.
    • getKeyWithKidSubstitute

      protected KeyWrapper getKeyWithKidSubstitute(String keyId, String algorithm, String keyIdSubstitute)
      Returns the key stored under keyId, or the active key for the given jws algorithm. Additionally, the function clones the key retrieved from Keycloak, replacing the original key ID by the substitute one if provided. This makes it possible to have a custom kid header when producing JSON web signatures.
    • getKey

      protected KeyWrapper getKey(String keyId, String algorithm)
      Returns the key stored under keyId, or the active key for the given jws algorithm.