Class CredentialRequestInfo

  • All Implemented Interfaces:
    Serializable

    public class CredentialRequestInfo
    extends Object
    implements Serializable
    Information about a credential request.

    This class represents information about a credential request that is sent to the credential endpoint or information about a credential request in the credential_requests array in a batch credential request that is sent to the batch credential endpoint.

    Since:
    3.66, Authlete 3.0
    See Also:
    OpenID for Verifiable Credential Issuance 1.0, Serialized Form
    • Constructor Detail

      • CredentialRequestInfo

        public CredentialRequestInfo()
    • Method Detail

      • getIdentifier

        public String getIdentifier()
        Get the identifier of the credential request.

        The identifier is assigned by Authlete when the /vci/single/parse API or the /vci/batch/parse API is used. The identifier is used as a transaction ID, too. The format is a base64url string that consists of 43 characters with 256-bit entropy.

        Returns:
        The identifier of the credential request.
      • setIdentifier

        public CredentialRequestInfo setIdentifier​(String identifier)
        Set the identifier of the credential request.

        The identifier is assigned by Authlete when the /vci/single/parse API or the /vci/batch/parse API is used. The identifier is used as a transaction ID, too. The format is a base64url string that consists of 43 characters with 256-bit entropy.

        Parameters:
        identifier - The identifier of the credential request.
        Returns:
        this object.
      • getFormat

        public String getFormat()
        Get the value of the format parameter in the credential request.

        This format property is available only when the supported OID4VCI specification version is "1.0-ID1" (i.e., when the Service's oid4vciVersion is unset or set to "1.0-ID1") and the credential request contains the format parameter. Note that in the final version of the specification, the format parameter is deprecated.

        Returns:
        The value of the format parameter in the credential request. Such as "dc+sd-jwt".
      • setFormat

        public CredentialRequestInfo setFormat​(String format)
        Set the value of the format parameter in the credential request.

        This format property is available only when the supported OID4VCI specification version is "1.0-ID1" (i.e., when the Service's oid4vciVersion is unset or set to "1.0-ID1") and the credential request contains the format parameter. Note that in the final version of the specification, the format parameter is deprecated.

        Parameters:
        format - The value of the format parameter in the credential request. Such as "jwt_vc_json" and "dc+sd-jwt".
        Returns:
        this object.
      • getBindingKey

        public String getBindingKey()
        Get the binding key specified by the proof in the credential request. The format is JWK (RFC 7517 JSON Web Key).
        Returns:
        The binding key. If the credential request does not contain a proof, a binding key is not available. In the case, null is returned.
        See Also:
        RFC 7517 JSON Web Key
      • setBindingKey

        public CredentialRequestInfo setBindingKey​(String bindingKey)
        Set the binding key specified by the proof in the credential request. The format is JWK (RFC 7517 JSON Web Key).
        Parameters:
        bindingKey - The binding key.
        Returns:
        this object}.
      • getBindingKeys

        public String[] getBindingKeys()
        Get the binding keys specified by the proofs in the credential request. The format of each entry in the returned array is a string representation of JWK (RFC 7517 JSON Web Key).
        Returns:
        The binding keys. If the credential request does not contain proofs, binding keys are not available. In the case, null is returned.
        Since:
        4.2
        See Also:
        RFC 7517 JSON Web Key
      • setBindingKeys

        public CredentialRequestInfo setBindingKeys​(String[] bindingKeys)
        Set the binding keys specified by the proofs in the credential request. The format of each entry in the returned array is a string representation of JWK (RFC 7517 JSON Web Key).
        Parameters:
        bindingKeys - The binding keys.
        Returns:
        this object.
        Since:
        4.2
      • getDetails

        public String getDetails()
        Get the details of the credential request. The format is JSON Object.

        The value is almost the same as the credential request except that it does not contain the "format" parameter, the "proof" parameter, the "proofs" parameter, and the credential_response_encryption parameter.

        For example, when the original credential request holds the following:

         {
           "format": "jwt_vc_json",
           "credential_definition": {
             "type": [
               "VerifiableCredential",
               "UniversityDegreeCredential"
             ]
           },
           "proof": {
             "proof_type": "jwt",
             "jwt": "eyJ...OzM"
           }
         }
         
        this details parameter holds the following:
         {
           "credential_definition": {
             "type": [
               "VerifiableCredential",
               "UniversityDegreeCredential"
             ]
           }
         }
         
        Returns:
        The details of the credential request.
      • setDetails

        public CredentialRequestInfo setDetails​(String details)
        Set the details of the credential request. The format is JSON Object.
        Parameters:
        details - The details of the credential request.
        Returns:
        this object.
      • getCredentialConfigurationId

        public String getCredentialConfigurationId()
        Get the value of the credential_configuration_id parameter in the credential request.

        This property is not available when the supported OID4VCI specification version is "1.0-ID1" (i.e., when the Service's oid4vciVersion is unset or set to "1.0-ID1"), because the credential_configuration_id parameter does not exist in OID4VCI 1.0 ID1.

        Returns:
        The value of the credential_configuration_id parameter in the credential request.
        Since:
        4.34, Authlete 3.0.25
      • setCredentialConfigurationId

        public CredentialRequestInfo setCredentialConfigurationId​(String id)
        Set the value of the credential_configuration_id parameter in the credential request.

        This property is not available when the supported OID4VCI specification version is "1.0-ID1" (i.e., when the Service's oid4vciVersion is unset or set to "1.0-ID1"), because the credential_configuration_id parameter does not exist in OID4VCI 1.0 ID1.

        Parameters:
        id - The value of the credential_configuration_id parameter in the credential request.
        Returns:
        this object.
        Since:
        4.34, Authlete 3.0.25
      • getCredentialIdentifier

        public String getCredentialIdentifier()
        Get the value of the credential_identifier parameter in the credential request.

        This property is not available when the supported OID4VCI specification version is "1.0-ID1" (i.e., when the Service's oid4vciVersion is unset or set to "1.0-ID1"), because Authlete does not support the credential_identifier parameter for OID4VCI 1.0 ID1.

        Returns:
        The value of the credential_identifier parameter in the credential request.
        Since:
        4.34, Authlete 3.0.25
      • setCredentialIdentifier

        public CredentialRequestInfo setCredentialIdentifier​(String identifier)
        Set the value of the credential_identifier parameter in the credential request.

        This property is not available when the supported OID4VCI specification version is "1.0-ID1" (i.e., when the Service's oid4vciVersion is unset or set to "1.0-ID1"), because Authlete does not support the credential_identifier parameter for OID4VCI 1.0 ID1.

        Parameters:
        identifier - The value of the credential_identifier parameter in the credential request.
        Returns:
        this object.
        Since:
        4.34, Authlete 3.0.25