Class CredentialJwtIssuerMetadataResponse
- java.lang.Object
-
- com.authlete.common.dto.ApiResponse
-
- com.authlete.common.dto.CredentialJwtIssuerMetadataResponse
-
- All Implemented Interfaces:
Serializable
public class CredentialJwtIssuerMetadataResponse extends ApiResponse
Response from Authlete's/vci/jwtissuerAPI.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/jwtissuerAPI returns JSON which can be mapped to this class. The credential issuer implementation should retrieve the value of theresponse parameter from the API response and take the following steps according to the value.actionOKWhen the value of the
response parameter isaction, it means that Authlete could prepare the metadata successfully.OK
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/jwtissuerAPI and it is available as theresponse parameter.responseContentThe 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
responseContentresponse parameter)NOT_FOUNDWhen the value of the
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 "response parameter isaction, 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.NOT_FOUND404 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/jwtissuerAPI and it is available as theresponse parameter.responseContentThe 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
responseContentresponse parameter)INTERNAL_SERVER_ERRORWhen the value of the
In this case, a simple implementation of the JWT issuer metadata endpoint would return an HTTP response with the HTTP status code "response parameter isaction, it means that an unexpected error has occurred on Authlete side or the service has not been set up properly yet.INTERNAL_SERVER_ERROR500 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/jwtissuerAPI and it is available as theresponse parameter.responseContentSuch 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
responseContentresponse 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-issuerto/.well-known/jwt-vc-issuerby 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCredentialJwtIssuerMetadataResponse.ActionThe next action that the implementation of the JWT issuer metadata endpoint (/.well-known/jwt-vc-issuer) should take after getting a response from Authlete's/vci/jwtissuerAPI.
-
Constructor Summary
Constructors Constructor Description CredentialJwtIssuerMetadataResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CredentialJwtIssuerMetadataResponse.ActiongetAction()Get the next action that the implementation of the JWT issuer metadata endpoint should take after getting a response from Authlete's/vci/jwtissuerAPI.StringgetResponseContent()Get the content that the implementation of the JWT issuer metadata endpoint should use when it constructs a response.CredentialJwtIssuerMetadataResponsesetAction(CredentialJwtIssuerMetadataResponse.Action action)Set the next action that the implementation of the JWT issuer metadata endpoint should take after getting a response from Authlete's/vci/jwtissuerAPI.CredentialJwtIssuerMetadataResponsesetResponseContent(String content)Set the content that the implementation of the JWT issuer metadata endpoint should use when it constructs a response.-
Methods inherited from class com.authlete.common.dto.ApiResponse
getResponseHeaders, getResultCode, getResultMessage, setResponseHeaders, setResultCode, setResultMessage
-
-
-
-
Method Detail
-
getAction
public CredentialJwtIssuerMetadataResponse.Action getAction()
Get the next action that the implementation of the JWT issuer metadata endpoint should take after getting a response from Authlete's/vci/jwtissuerAPI.- Returns:
- The next action.
-
setAction
public CredentialJwtIssuerMetadataResponse setAction(CredentialJwtIssuerMetadataResponse.Action action)
Set the next action that the implementation of the JWT issuer metadata endpoint should take after getting a response from Authlete's/vci/jwtissuerAPI.- Parameters:
action- The next action.- Returns:
thisobject.
-
getResponseContent
public String getResponseContent()
Get the content that the implementation of the JWT issuer metadata endpoint should use when it constructs a response.In the successful case, the content is JSON like below.
{ "issuer": "Service.getCredentialIssuerMetadata().getCredentialIssuer()", "jwks_uri": "Service.getCredentialJwksUri()" }- Returns:
- The response content in the JSON format.
-
setResponseContent
public CredentialJwtIssuerMetadataResponse setResponseContent(String content)
Set the content that the implementation of the JWT issuer metadata endpoint should use when it constructs a response.In the successful case, the content should be JSON like below.
{ "issuer": "Service.getCredentialIssuerMetadata().getCredentialIssuer()", "jwks_uri": "Service.getCredentialJwksUri()" }- Parameters:
content- The response content in the JSON format.- Returns:
thisobject.
-
-