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, 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.
        Returns:
        The value of the format parameter in the credential request. Such as "vc+sd-jwt".
      • setFormat

        public CredentialRequestInfo setFormat​(String format)
        Set the value of the format parameter in the credential request.
        Parameters:
        format - The value of the format parameter in the credential request. Such as "jwt_vc_json" and "vc+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:
      • 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 and the "proof" 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.