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, 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.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.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.- Returns:
- The value of the
formatparameter in the credential request. Such as"vc+sd-jwt".
-
setFormat
public CredentialRequestInfo setFormat(String format)
Set the value of theformatparameter in the credential request.- Parameters:
format- The value of theformatparameter in the credential request. Such as"jwt_vc_json"and"vc+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.
-
-