Class CredentialJwtIssuerMetadataResponse

  • All Implemented Interfaces:
    Serializable

    public class CredentialJwtIssuerMetadataResponse
    extends ApiResponse
    Response from Authlete's /vci/jwtissuer API.

    The Authlete API is supposed to be called from within the implementation of the JWT VC issuer metadata endpoint (/.well-known/jwt-vc-issuer) of the credential issuer.

    Authlete's /vci/jwtissuer API returns JSON which can be mapped to this class. The credential issuer implementation should retrieve the value of the action response parameter from the API response and take the following steps according to the value.

    OK

    When the value of the action response parameter is OK, it means that Authlete could prepare the metadata successfully.

    In this case, the implementation of the JWT issuer metadata endpoint (/.well-known/jwt-vc-issuer) of the credential issuer should return an HTTP response with the HTTP status code "200 OK" and the content type "application/json". The message body of the response has been prepared by Authlete's /vci/jwtissuer API and it is available as the responseContent response parameter.

    The implementation of the JWT issuer metadata endpoint can construct an HTTP response by doing like below.

     200 OK
     Content-Type: application/json
     (Other HTTP headers)
    
     (the value of the responseContent response parameter)

    NOT_FOUND

    When the value of the action response parameter is NOT_FOUND, it means that the service configuration has not enabled the feature of Verifiable Credentials and so the JWT issuer metadata endpoint should not be accessed.

    In this case, the implementation of the JWT issuer metadata endpoint of the credential issuer should return an HTTP response with the HTTP status code "404 Not Found" and the content type "application/json". The message body (= error information in the JSON format) of the response has been prepared by Authlete's /vci/jwtissuer API and it is available as the responseContent response parameter.

    The implementation of the JWT issuer metadata endpoint can construct an HTTP response by doing like below.

     404 Not Found
     Content-Type: application/json
     (Other HTTP headers)
    
     (the value of the responseContent response parameter)

    INTERNAL_SERVER_ERROR

    When the value of the action response parameter is INTERNAL_SERVER_ERROR, it means that an unexpected error has occurred on Authlete side or the service has not been set up properly yet.

    In this case, a simple implementation of the JWT issuer metadata endpoint would return an HTTP response with the HTTP status code "500 Internal Server Error" and the content type "application/json". The message body (= error information in the JSON format) of the response has been prepared by Authlete's /vci/jwtissuer API and it is available as the responseContent response parameter.

    Such simple implementation of the JWT issuer metadata endpoint can construct an HTTP response by doing like below.

     500 Internal Server Error
     Content-Type: application/json
     (Other HTTP headers)
    
     (the value of the responseContent response parameter)

    However, in real commercial deployments, it is rare for a credential issuer to return "500 Internal Server Error" when it encounters an unexpected internal error. It's up to implementations of credential issuers what they actually return in the case of internal server error.

    NOTE: The well-known path has been changed from /.well-known/jwt-issuer to /.well-known/jwt-vc-issuer by a breaking change of the SD-JWT VC specification.

    Since:
    3.79, Authlete 3.0
    See Also:
    CredentialJwtIssuerMetadataRequest, SD-JWT-based Verifiable Credentials (SD-JWT VC), Serialized Form