Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

Dynamic Client Registration

Christian Smith edited this page Apr 27, 2014 · 9 revisions

Client Registration Endpoint

Registration Request

The body of a client registration request may contain any of the metadata values specified in OpenID Connect Dynamic Client Registration 1.0, Section 2. Client Metadata. Values not understood by the server are ignored. Only a valid redirect_uris value is required.

POST /register HTTP/1.1
Content-Type: application/json
Host: your.authorization.server

{
  "client_name":"Triangular Pretzel",
  "redirect_uris":["https://example.com/callback"]
}

Registration Response

In addition to client metadata, the registration response contains a registration_client_uri specifying the configuration endpoint for this client, and a registration_access_token which must be used as a bearer token per RFC6750 to access that resource.

HTTP/1.1 201 Created            
cache-control: no-store
pragma: no-cache
content-type: application/json

{
  "client_id":"e090a523-2ea8-43c8-b012b58ae60ce25d",
  "client_name":"Example",
  "application_type":"web",
  "redirect_uris":["https://example.com/callback"],
  "client_id_issued_at":1398534329550,
  "registration_client_uri":"https://accounts.anvil.io/register/e090a523-2ea8-43c8-b012-b58ae60ce25d",
  "registration_access_token":"eyJhbGciOiJSUzI1NiJ9.eyJ***2fQ.UmN***kE0"
}

Client Configuration Endpoint

Client Read Request

GET /register/CLIENT_ID HTTP/1.1                                                                                                    
Host: your.authorization.server
Authorization: Bearer eyJ***iJ9.eyJ***2fQ.UmN***BsQ

Client Read Response

HTTP/1.1 200 OK               
content-type: application/json

{
  "client_id":"e090a523-2ea8-43c8-b012-b58ae60ce25d",
  "client_name":"Example",
  "application_type":"web",
  "redirect_uris":["https://example.com/callback"],
  "client_id_issued_at":1398534329550,
  "registration_client_uri":"https://accounts.anvil.io/register/e090a523-2ea8-43c8-b012-b58ae60ce25d"
}

Client Update Request

PATCH /register/e090a523-2ea8-43c8-b012-b58ae60ce25d HTTP/1.1
Host: your.authorization.server
Authorization: Bearer eyJ***iJ9.eyJ***2fQ.UmN***0xR
Content-type: application/json

{
  "client_name":"Perpendicular Parallels"
}

Client Update Response

HTTP/1.1 200 OK
content-type: application/json

{
  "client_id":"e090a523-2ea8-43c8-b012-b58ae60ce25d",
  "client_name":"Perpendicular Parallels",
  "application_type":"web",
  "redirect_uris":["https://example.com/callback"],
  "client_id_issued_at":1398534329550,
  "registration_client_uri":"https://accounts.anvil.io/register/e090a523-2ea8-43c8-b012-b58ae60ce25d"
}