Class OID4VCIssuerEndpoint

java.lang.Object
org.keycloak.protocol.oid4vc.issuance.OID4VCIssuerEndpoint

public class OID4VCIssuerEndpoint extends Object
Provides the (REST-)endpoints required for the OID4VCI protocol.

Author:
Stefan Wiedemann
  • Field Details

    • CREDENTIAL_CONFIGURATION_IDS_NOTE

      public static final String CREDENTIAL_CONFIGURATION_IDS_NOTE
      Session note key for storing credential configuration IDs from credential offer. This allows the authorization details processor to easily retrieve the configuration IDs without having to search through all session notes or parse the full credential offer.
      See Also:
    • CREDENTIAL_IDENTIFIER_PREFIX

      public static final String CREDENTIAL_IDENTIFIER_PREFIX
      Prefix for session note keys that store the mapping between credential identifiers and configuration IDs. This is used to store mappings generated during authorization details processing.
      See Also:
    • AUTHORIZATION_DETAILS_CLAIMS_PREFIX

      public static final String AUTHORIZATION_DETAILS_CLAIMS_PREFIX
      Prefix for session note keys that store authorization details claims. This is used to store claims from authorization details for later use during credential issuance.
      See Also:
    • DEFLATE_COMPRESSION

      public static final String DEFLATE_COMPRESSION
      See Also:
    • NONCE_PATH

      public static final String NONCE_PATH
      See Also:
    • CREDENTIAL_PATH

      public static final String CREDENTIAL_PATH
      See Also:
    • CREDENTIAL_OFFER_PATH

      public static final String CREDENTIAL_OFFER_PATH
      See Also:
    • RESPONSE_TYPE_IMG_PNG

      public static final String RESPONSE_TYPE_IMG_PNG
      See Also:
    • CREDENTIAL_OFFER_URI_CODE_SCOPE

      public static final String CREDENTIAL_OFFER_URI_CODE_SCOPE
      See Also:
  • Constructor Details

  • Method Details

    • getCNonce

      @POST @Produces("application/json") @Path("nonce") public jakarta.ws.rs.core.Response getCNonce()
      the OpenId4VCI nonce-endpoint
      Returns:
      a short-lived c_nonce value that must be presented in key-bound proofs at the credential endpoint.
    • getCredentialOfferURI

      @GET @Produces({"application/json","image/png"}) @Path("credential-offer-uri") public jakarta.ws.rs.core.Response getCredentialOfferURI(@QueryParam("credential_configuration_id") String vcId, @QueryParam("type") @DefaultValue("uri") OfferUriType type, @QueryParam("width") @DefaultValue("200") int width, @QueryParam("height") @DefaultValue("200") int height)
      Provides the URI to the OID4VCI compliant credentials offer
    • getCredentialOffer

      @GET @Produces("application/json") @Path("credential-offer/{sessionCode}") public jakarta.ws.rs.core.Response getCredentialOffer(@PathParam("sessionCode") String sessionCode)
      Provides an OID4VCI compliant credential offer
    • requestCredential

      @POST @Consumes({"application/json","application/jwt"}) @Produces({"application/json","application/jwt"}) @Path("credential") public jakarta.ws.rs.core.Response requestCredential(String requestPayload)
      Returns a verifiable credential