Class CredentialSingleIssueRequest

  • All Implemented Interfaces:
    Serializable

    public class CredentialSingleIssueRequest
    extends Object
    implements Serializable
    A request to Authlete's /vci/single/issue API.

    The Authlete API is supposed to be called by the implementation of the credential endpoint. The endpoint is defined in the "OpenID for Verifiable Credential Issuance 1.0" (OID4VCI) specification.

    The implementation of the credential endpoint is expected to call the following Authlete APIs in the order.

    1. /auth/introspection
    2. /vci/single/parse
    3. /vci/single/issue

    The role of the /vci/single/issue API is to issue a credential or a transaction ID and to prepare a response that should be returned from the credential endpoint.

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

      • CredentialSingleIssueRequest

        public CredentialSingleIssueRequest()
    • Method Detail

      • getAccessToken

        public String getAccessToken()
        Get the access token that was presented at the credential endpoint.
        Returns:
        The access token that was presented at the credential endpoint.
      • setAccessToken

        public CredentialSingleIssueRequest setAccessToken​(String accessToken)
        Set the access token that was presented at the credential endpoint.
        Parameters:
        accessToken - The access token that was presented at the credential endpoint.
        Returns:
        this object.
      • getOrder

        public CredentialIssuanceOrder getOrder()
        Get the credential order that provides an instruction for issuing a credential.
        Returns:
        The instruction for credential issuance.
      • setOrder

        public CredentialSingleIssueRequest setOrder​(CredentialIssuanceOrder order)
        Set the credential order that provides an instruction for issuing a credential.
        Parameters:
        order - The instruction for credential issuance.
        Returns:
        this object.
      • isDenied

        public boolean isDenied()
        Get the flag that indicates whether to deny the credential request.

        If this parameter is set to true, the response content prepared by Authlete will contain "error":"credential_request_denied" like below.

         {
             "error": "credential_request_denied"
         }
         

        Note that the credential_request_denied error code does not exist in OID4VCI 1.0 ID1.

        Returns:
        true for generating a response content containing "error":"credential_request_denied".
        Since:
        4.35, Authlete 3.0.25
      • setDenied

        public CredentialSingleIssueRequest setDenied​(boolean denied)
        Set the flag that indicates whether to deny the credential request.

        If this parameter is set to true, the response content prepared by Authlete will contain "error":"credential_request_denied" like below.

         {
             "error": "credential_request_denied"
         }
         

        Note that the credential_request_denied error code does not exist in OID4VCI 1.0 ID1.

        Parameters:
        denied - true for generating a response content containing "error":"credential_request_denied".
        Returns:
        this object.
        Since:
        4.35, Authlete 3.0.25
      • getInterval

        public int getInterval()
        Get the minimum amount of time in seconds that the Wallet SHOULD wait after receiving the response before sending a new request to the Deferred Credential Endpoint.

        The value of this parameter is used as the value of the interval parameter in the credential response. However, the interval parameter is included in the credential response only when the following conditions are met:

        • The value of the order.issuanceDeferred request parameter is true.
        • The version of the OID4VCI specification is 1.0-Final or later (that is, the oid4vciVersion property of Service is set and its value is not "1.0-ID1").
        Returns:
        The minimum amount of time in seconds that the Wallet SHOULD wait after receiving the response before sending a new request to the Deferred Credential Endpoint.
        Since:
        4.35, Authlete 3.0.25
      • setInterval

        public CredentialSingleIssueRequest setInterval​(int interval)
        Set the minimum amount of time in seconds that the Wallet SHOULD wait after receiving the response before sending a new request to the Deferred Credential Endpoint.

        The value of this parameter is used as the value of the interval parameter in the credential response. However, the interval parameter is included in the credential response only when the following conditions are met:

        • The value of the order.issuanceDeferred request parameter is true.
        • The version of the OID4VCI specification is 1.0-Final or later (that is, the oid4vciVersion property of Service is set and its value is not "1.0-ID1").
        Parameters:
        interval - The minimum amount of time in seconds that the Wallet SHOULD wait after receiving the response before sending a new request to the Deferred Credential Endpoint.
        Returns:
        this object.
        Since:
        4.35, Authlete 3.0.25