Delete Client
Delete a dynamically registered client. This API is supposed to be used to implement a client registration management endpoint that complies with RFC 7592 (OAuth 2.0 Dynamic Registration Management).
Description
This API is supposed to be called from the within the implementation of the client registration management endpoint of the authorization server. The authorization server implementation should retrieve the value of action from the response and take the following steps according to the value. INTERNAL_SERVER_ERROR When the value of action is INTERNAL\_SERVER\_ERROR, it means that the API call from the authorization server implementation was wrong or that an error occurred in Authlete. In either case, from a viewpoint of the client or developer, it is an error on the server side. Therefore, the authorization server implementation should generate a response with "500 Internal Server Error"s and application/json. The value of responseContent is a JSON string which describes the error, so it can be used as the entity body of the response. The following illustrates the response which the authorization server implementation should generate and return to the client or developer.
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{responseContent}
The endpoint implementation may return another different response to the client or developer since "500 Internal Server Error" is not required by the specification. BAD_REQUEST When the value of action is BAD\_REQUEST, it means that the request from the client or developer was wrong. The authorization server implementation should generate a response with "400 Bad Request" and application/json. The value of responseContent is a JSON string which describes the error, so it can be used as the entity body of the response. The following illustrates the response which the authorization server implementation should generate and return to the client or developer.
HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{responseContent}
UNAUTHORIZED When the value of action is UNAUTHORIZED, it means that the registration access token used by the client configuration request (RFC 7592) is invalid, or the client application which the token is tied to does not exist any longer or is invalid. The HTTP status of the response returned to the client application must be "401 Unauthorized" and the content type must be application/json. The value of responseContent is a JSON string which describes the error, so it can be used as the entity body of the response. The following illustrates the response which the endpoint implementation should generate and return to the client application.
HTTP/1.1 401 Unauthorized
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{responseContent}
NOTE: The UNAUTHORIZED value was added in October, 2021. See the description of Service.unauthorizedOnClientConfigSupported for details. DELETED When the value of action is DELETED, it means that the request from the client or developer is valid. The authorization server implementation should generate a response to the client or developer with "204 No Content". The following illustrates the response which the authorization server implementation should generate and return to the client or developer.
HTTP/1.1 204 No Content
Cache-Control: no-store
Pragma: no-cache
Path parameters
A service ID.
Request body
Response
Example response
{
"client": {
"number": 1140735077,
"serviceNumber": 715948317,
"clientName": "My Test Client",
"clientId": "1140735077",
"clientSecret": "gXz97ISgLs4HuXwOZWch8GEmgL4YMvUJwu3er_kDVVGcA0UOhA9avLPbEmoeZdagi9yC_-tEiT2BdRyH9dbrQQ",
"clientType": "PUBLIC",
"redirectUris": [
"https://example.com/callback"
],
"responseTypes": [
"CODE"
],
"grantTypes": [
"AUTHORIZATION_CODE"
]
}
}