Class CredentialRequestInfo
- java.lang.Object
-
- com.authlete.common.dto.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_requestsarray 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 Summary
Constructors Constructor Description CredentialRequestInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBindingKey()Get the binding key specified by the proof in the credential request.String[]getBindingKeys()Get the binding keys specified by the proofs in the credential request.StringgetCredentialConfigurationId()Get the value of thecredential_configuration_idparameter in the credential request.StringgetCredentialIdentifier()Get the value of thecredential_identifierparameter in the credential request.StringgetDetails()Get the details of the credential request.StringgetFormat()Get the value of theformatparameter in the credential request.StringgetIdentifier()Get the identifier of the credential request.CredentialRequestInfosetBindingKey(String bindingKey)Set the binding key specified by the proof in the credential request.CredentialRequestInfosetBindingKeys(String[] bindingKeys)Set the binding keys specified by the proofs in the credential request.CredentialRequestInfosetCredentialConfigurationId(String id)Set the value of thecredential_configuration_idparameter in the credential request.CredentialRequestInfosetCredentialIdentifier(String identifier)Set the value of thecredential_identifierparameter in the credential request.CredentialRequestInfosetDetails(String details)Set the details of the credential request.CredentialRequestInfosetFormat(String format)Set the value of theformatparameter in the credential request.CredentialRequestInfosetIdentifier(String identifier)Set the identifier of the credential request.
-
-
-
Method Detail
-
getIdentifier
public String getIdentifier()
Get the identifier of the credential request.The identifier is assigned by Authlete when the
/vci/single/parseAPI or the/vci/batch/parseAPI 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/parseAPI or the/vci/batch/parseAPI 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:
thisobject.
-
getFormat
public String getFormat()
Get the value of theformatparameter in the credential request.This
formatproperty is available only when the supported OID4VCI specification version is"1.0-ID1"(i.e., when the Service'soid4vciVersionis unset or set to"1.0-ID1") and the credential request contains theformatparameter. Note that in the final version of the specification, theformatparameter is deprecated.- Returns:
- The value of the
formatparameter in the credential request. Such as"dc+sd-jwt".
-
setFormat
public CredentialRequestInfo setFormat(String format)
Set the value of theformatparameter in the credential request.This
formatproperty is available only when the supported OID4VCI specification version is"1.0-ID1"(i.e., when the Service'soid4vciVersionis unset or set to"1.0-ID1") and the credential request contains theformatparameter. Note that in the final version of the specification, theformatparameter is deprecated.- Parameters:
format- The value of theformatparameter in the credential request. Such as"jwt_vc_json"and"dc+sd-jwt".- Returns:
thisobject.
-
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,
nullis 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:
thisobject}.
-
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,
nullis 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:
thisobject.- 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 thecredential_response_encryptionparameter.For example, when the original credential request holds the following:
this{ "format": "jwt_vc_json", "credential_definition": { "type": [ "VerifiableCredential", "UniversityDegreeCredential" ] }, "proof": { "proof_type": "jwt", "jwt": "eyJ...OzM" } }detailsparameter 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:
thisobject.
-
getCredentialConfigurationId
public String getCredentialConfigurationId()
Get the value of thecredential_configuration_idparameter in the credential request.This property is not available when the supported OID4VCI specification version is
"1.0-ID1"(i.e., when the Service'soid4vciVersionis unset or set to"1.0-ID1"), because thecredential_configuration_idparameter does not exist in OID4VCI 1.0 ID1.- Returns:
- The value of the
credential_configuration_idparameter in the credential request. - Since:
- 4.34, Authlete 3.0.25
-
setCredentialConfigurationId
public CredentialRequestInfo setCredentialConfigurationId(String id)
Set the value of thecredential_configuration_idparameter in the credential request.This property is not available when the supported OID4VCI specification version is
"1.0-ID1"(i.e., when the Service'soid4vciVersionis unset or set to"1.0-ID1"), because thecredential_configuration_idparameter does not exist in OID4VCI 1.0 ID1.- Parameters:
id- The value of thecredential_configuration_idparameter in the credential request.- Returns:
thisobject.- Since:
- 4.34, Authlete 3.0.25
-
getCredentialIdentifier
public String getCredentialIdentifier()
Get the value of thecredential_identifierparameter in the credential request.This property is not available when the supported OID4VCI specification version is
"1.0-ID1"(i.e., when the Service'soid4vciVersionis unset or set to"1.0-ID1"), because Authlete does not support thecredential_identifierparameter for OID4VCI 1.0 ID1.- Returns:
- The value of the
credential_identifierparameter in the credential request. - Since:
- 4.34, Authlete 3.0.25
-
setCredentialIdentifier
public CredentialRequestInfo setCredentialIdentifier(String identifier)
Set the value of thecredential_identifierparameter in the credential request.This property is not available when the supported OID4VCI specification version is
"1.0-ID1"(i.e., when the Service'soid4vciVersionis unset or set to"1.0-ID1"), because Authlete does not support thecredential_identifierparameter for OID4VCI 1.0 ID1.- Parameters:
identifier- The value of thecredential_identifierparameter in the credential request.- Returns:
thisobject.- Since:
- 4.34, Authlete 3.0.25
-
-