This documentation is a work in progress and will be released with the WSO2 API Manager 3.0.0 GA release.
DCR and DCRM APIs - API Manager 3.0.0 - WSO2 Documentation

All docs This doc
||
Skip to end of metadata
Go to start of metadata

OAuth2 dynamic client registration endpoint

The dynamic client registration endpoint is capable of dynamically registering OAuth 2.0 clients with authorization servers. The client needs to send a registration request with a set of desired client metadata. This results in a registration response that includes a client identifier and the client metadata values registered for the client.

Register an application

Given below is a sample request and response for registering an application.

We need to provide username and password via Basic authentication header.


POST https://localhost:9443/api/identity/oauth2/dcr/v1.0/register HTTP/1.1
Authorization: Basic YWRtaW46YWRtaW4=
Content-Type: application/json
Content-Length: 114
Host: localhost:9443

{
  "redirect_uris": [
    "http://localhost"
  ],
  "client_name": "name_1",
  "grant_types": [
    "password"
  ]
}
HTTP/1.1 201 Created
Content-Length: 163
Content-Type: application/json
Connection: Close

{
   "client_id": "3701c489-3e03-4f2b-a125-ee3f8d25a501",
   "client_secret": "4bff3ec0-a5ab-4252-8768-126633278333",
   "redirect_uris": ["http://localhost"],
   "client_name": "name_1"
}


OAuth2 dynamic client registration management endpoint

The dynamic client registration management endpoint is capable of retrieving/modifying the properties of an existing registered client and unregistering an existing client. Use the clientId obtained in the above response to perform the operations given below.

Retrieve an application

Given below is a sample request and response for retrieving an application,

GET https://localhost:9443/api/identity/oauth2/dcr/v1.0/register/3701c489-3e03-4f2b-a125-ee3f8d25a501 HTTP/1.1
Host: localhost:9443
HTTP/1.1 200 OK
Content-Length: 163
Content-Type: application/json
Connection: Close

{
   "client_id": "3701c489-3e03-4f2b-a125-ee3f8d25a501",
   "client_secret": "4bff3ec0-a5ab-4252-8768-126633278333",
   "redirect_uris": ["http://localhost"],
   "client_name": "name_1"
}

Update an application

Given below is a sample request and response for updating an application,

PUT https://localhost:9443/api/identity/oauth2/dcr/v1.0/register/3701c489-3e03-4f2b-a125-ee3f8d25a501 HTTP/1.1
Content-Type: application/json
Content-Length: 115
Host: localhost:9443

{
  "redirect_uris": [
    "http://localhost/123"
  ],
  "client_name": "name_1",
  "grant_types": [
    "password"
  ]
}
HTTP/1.1 200 OK
Content-Length: 164
Content-Type: application/json
Connection: Close

{
   "client_id": "3701c489-3e03-4f2b-a125-ee3f8d25a501",
   "client_secret": "4bff3ec0-a5ab-4252-8768-126633278333",
   "redirect_uris": ["http://localhost"],
   "client_name": "name_1"
}

Delete an application

Given below is a sample request and response for deleting an application,

DELETE https://localhost:9443/api/identity/oauth2/dcr/v1.0/register/3701c489-3e03-4f2b-a125-ee3f8d25a501 HTTP/1.1
Content-Type: application/json
Content-Length: 0
Host: localhost:9443
HTTP/1.1 204 No Content
Connection: Close
  • No labels