Access Management
Get Started
3. Create a Basic Client
🌟 key concept a client docid\ xlmvfa6lwtzcxpo xudq9 is an application that can request resources from the resource server client requests can be made either on behalf of an end user or directly from the client itself this example setup demonstrates how to create a basic client using the identos authorization server todo add overview diagram with step emphasized this setup will todo introduce example prerequisites this setup has no prerequisites step by step setup to create a client in the authorization server, we'll need to define the client as an oauth 2 0 client in the authorization server for our example, we'll assume that the hospital's blood glucose app already exists at a known uri in an actual authorization flow, this client would already hold the authorization keys necessary for accessing the resource server for a full explanation of each operation and its parameters, see create a client docid\ delhi bgrp2e4owfpqc3t define the client as an oauth 2 0 client run the admin api call below to define the blood glucose app client located at https //bg app fakehospital com/ as an oauth 2 0 client in the authorization server's oauth client metadata and oauth client databases since this will be the second oauth client in our authorization server, the blood glucose app will be id = 2 in both databases curl location g request patch '{{as admin uri}}' \\ \ header 'content type application/vnd api+json; ext=jsonpatch' \\ \ header 'authorization {{as admin static token}}' \\ \ header 'apiversion v1 0' \\ \ header 'accept language en' \\ \ data raw '\[ { "op" "add", "path" "/oauth client metadata", "value" { "id" 2, "type" "oauth client metadata", "attributes" { "issueruri" "https //bg app fakehospital com/", "clientauthenticationtype" "private key jwt", "clienttype" "confidential", "granttypes" "client credentials", "jwksraw" null, "jwksuri" "https //bg app fakehospital com/jwks", "scopes" "uma protection", "clientsecret" null } } }, { "op" "add", "path" "/oauth client", "value" { "type" "oauth client", "id" 2, "attributes" { "clientid" "blood glucose app", "clientname" "blood glucose app", "redirecturis" \[ "https //blg app fakehospital com/", "{{as uri}}" ] }, "relationships" { "oauthclientmetadata" { "data" { "type" "oauth client metadata", "id" 2 } } } } }, ]' view the client (optional) now check to see if the client exists curl location g request get '{{as admin uri}}/oauth client/4' \\ \ header 'content type application/vnd api+json' \\ \ header 'apiversion v1 0' \\ \ header 'authorization {{as admin static token}}' \\ \ header 'accept language en' next steps ✅ you just created a basic client in the authorization server! next step proceed to 4 get an access token docid\ scyrdyqemprtig6vbsdxr to learn how to create and grant an access token to the client you created learn more read the create a client docid\ delhi bgrp2e4owfpqc3t guide to learn more about creating and managing clients in the authorization server