LogoLogo
ProductsCommunityGitHubShare Feedback
IDP Kit
IDP Kit
  • What is the IDP Kit?
    • Introduction
    • IDP Kit
      • IDP Kit | Basics
        • Overview
        • Functionality
      • Architecture
  • Getting started
    • Quick Start
    • CLI | Command Line Interface
    • REST APIs
    • Dependency (JVM)
    • Public deployments
    • Build
      • Docker
  • Demos
    • Try Login With NFT
  • Tutorials
    • Login with NFTs | Next.js
      • IDP Kit Setup
      • Client Registration
      • NFT Collection Configuration
      • Next.js
    • Login with NFTs | Keycloak
      • IDP Kit Setup
      • Client Registration
      • NFT Collection Configuration
      • Keycloak (18.0.2)
      • Keycloak (>19.0.1)
      • Frontend - Next.js
    • Login with SSI | Next.js
      • IDP Kit Setup
      • Client Registration
      • Verifiable Credential Config
      • Next.js
  • Configuration and Setup
    • IDP Kit configuration and setup
    • OIDC Manager configuration
      • Keys and signatures
      • Client registration
      • Client authentication
      • Claim configuration
    • SIOP Manager configuration
    • NFT Manager configuration
  • Concepts
    • OIDC Authentication - Recap
    • Identity provision via SSI
    • Identity provision via NFTs
      • EVM | Identity Provision
        • Sign in With Ethereum (SIWE)
      • Tezos | Identity provision via NFTs
        • Sign-In with Tezos (SIWT)
      • Near | Identity provision via NFTs
        • Sign-in with Near Protocol (SIWN)
      • Polkadot | Identity provision via NFTs
        • Sign-in with Polkadot (SIWP)
      • Flow | Identity provision via NFTs
        • Sign-in with Flow (SIWF)
      • Algorand | Identity provision via NFTs
        • Sign-in with Algorand (SIWA)
    • IAM / KeyCloak integration
  • Community
    • Discord
    • Twitter
    • Newsletter
    • GitHub Discussions
  • DEVELOPER RELATIONS
    • Contribute
    • Roadmap
    • Share Feedback
    • Contact
  • Product Editions
    • Open Source | Always Free
    • Enterprise
    • Cloud Platform
Powered by GitBook
On this page
  • Authentication for dynamic client registration API
  • Registration access token
  • Open client registration
  • Authentication for existing client management
  • Register new client
  • List registered clients
  • Get client information by ID
  • Update client registration
  • Remove client registration

Was this helpful?

Export as PDF
  1. Configuration and Setup
  2. OIDC Manager configuration

Client registration

PreviousKeys and signaturesNextClient authentication

Last updated 2 years ago

Was this helpful?

The IDP Kit provides a command line interface (CLI) to register and manage clients. Furthermore, the dynamic client registration and management APIs are provided, according to the specifications in:

Authentication for dynamic client registration API

To register a new client via the dynamic client registration API, authentication using the registration access token is required by default. The IDP Kit can be configured to allow unauthenticated client registration.

Registration access token

To get this registration access token use the command:

waltid-idpkit config --oidc clients token

This will output a valid JWT token to use with the API endpoint, like this:

Output

[...]
Client registration master token:
eyJraWQiOiJhNGFhM2U4MT[...]nE3jfPqMQlgEhh6l0VbwhbsDjy7Q

Open client registration

To allow unauthenticated client registration requests via the REST API, set the following in the idp-config.json:

{
  [...]
  "openClientRegistration": true,
  [...]
}

Authentication for existing client management

Register new client

CLI

To register a new client use the register command, like e.g.:

waltid-idpkit config --oidc clients register -n "MyApp" -r "https://myapp.com/redirect_uri"

To specify multiple redirect_uris, repeat the -r ... flag for each URI.

Use --all-redirect-uris and omit the -r ... flags, to allow all redirect URIs for this client.

Use -u <client_id> to update an existing client by its ID, instead of creating a new registration.

REST API

[POST] /api/oidc/clients/register

POST /api/oidc/clients/register HTTP/1.1
[...]
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJ[...]

{
  "client_name": "MyApp",
  "redirect_uris": [
    "https://myapp.com/redirect_uri"
  ],
  "all_redirect_uris": false
}

Result

Example:

{
    "client_secret_expires_at":0,
    "all_redirect_uris":false,
    "registration_client_uri":"https://[...]/api/oidc/clients/EI_9T[...]",
    "client_id_issued_at":1658239641,
    "client_secret":"884DUlIj4[...]",
    "redirect_uris":[
        "https://myapp.com/redirect_uri"
    ],
    "registration_access_token":"eyJraWQi[...]",
    "client_id":"EI_9TT[...]"
}

This example response has the following properties:

  • client_secret_expires_at: Expiration timestamp of client secret, or 0 if no expiration

  • all_redirect_uris: Specific to IDP Kit: allow all redirect URIs for this client if redirect_uris is empty or not set

  • registration_client_uri: URI of API to get, update or delete this client information

  • registration_access_token: access token for using registration_client_uri API to get, update or delete this client information

  • client_id_issued_at: Timestamp of first registration of this client

  • client_secret: Client secret to use for token endpoint authentication method

  • client_id: Client id to use for token endpoint authentication method

  • redirect_uris: Array of redirect URIs that are allowed for this client

List registered clients

To list all registered clients, type

waltid-idpkit config --oidc clients list

This will output a list of keys and client information objects for all registered clients:

Output

[...]
* EI_9TTRXw0C7gzKNLNfwNEMH1jChqzj-l0n4LUWxYm4:
{
    "client_secret_expires_at":0,
    [...]
    "client_id":"EI_9TTRXw0C7gzKNLNfwNEMH1jChqzj-l0n4LUWxYm4"
}
--------------------
* [...]

Get client information by ID

CLI

To get a client information by the client ID, use this command, specifying the ID via the -i ... command argument:

waltid-idpkit config --oidc clients get -i 6s5YcV84Tg7cZ8BM2-b6qcJiHKDTZD8YdQt-cf4eDbM

REST API

[GET] /api/oidc/clients/<client_id>

Result

Update client registration

CLI

waltid-idpkit config --oidc clients register -n "MyApp" -r "https://myapp.com/UPDATED_URI" -u EI_9TTRXw0C7gzKNLNfwNEMH1jChqzj-l0n4LUWxYm4

All required parameters MUST be specified in the update command, as the existing registration will be replaced but not merged with parameters given in this command!

REST API

[PUT] /api/oidc/clients/<client_id>

All required parameters MUST be included in the update request body, as the existing registration will be replaced but not merged with object given in the update request!

Result

Remove client registration

CLI

Use the remove command to unregister an existing client registration:

waltid-idpkit config --oidc clients remove -i EI_9TTRXw0C7gzKNLNfwNEMH1jChqzj-l0n4LUWxYm4

Example output

[...]
[main] INFO id.walt.idp.oidc.OIDCClientRegistry - Unregistering client EI_9TTRXw0C7gzKNLNfwNEMH1jChqzj-l0n4LUWxYm4
Client removed

REST API

[DELETE] /api/oidc/clients/<client_id>

The result of a successful delete request, is an empty response with the HTTP response code 204 No Content.

For managing registered clients, i.e. get, update or removal of client information, via the dynamic client management API, you have to use the registration_client_uri and registration_access_token as returned by the response for the specific client.

The , for registering new clients, does NOT grant permission to manage existing client registrations!

Post a object to this endpoint, using the described above, like shown in this simple example:

If is enabled, the registration access token in the Authorization header can be omitted in this request.

In case of success, the CLI and REST API will output a client information object, corresponding to the client registration response from the OIDC spec: .

Each listed object corresponds to the client registration response, described in the section .

To get the client info via the dynamic client management API, make a GET call to the registration_client_uri using the registration_access_token given in the client information obtained from the initial or the latest .

Clients use the registration_client_uri as returned by the server in the registration response object, and MUST NOT construct the URL from component pieces, such as API endpoint and client ID.

The output is a client information object, that corresponds to the client registration response, described in the section .

To update an existing client registration use the -u ... command flag of the , like so:

Post the updated client information, including all required parameters, to the registration_client_uri using the HTTP PUT method and the registration_access_token given in the client information obtained from the initial or the latest .

Clients use the registration_client_uri as returned by the server in the registration response object, and MUST NOT construct the URL from component pieces, such as API endpoint and client ID.

The output is a client information object, with the updated registration information, that corresponds to the client registration response, described in the section .

To unregister the client via the dynamic client management API, make a DELETE request to the registration_client_uri using the registration_access_token given in the client information obtained from the initial or the latest .

Clients use the registration_client_uri as returned by the server in the registration response object, and MUST NOT construct the URL from component pieces, such as API endpoint and client ID.

Client Registration Response
MUST
MUST
MUST
client registration
registration access token
client registration request
registration access token
open client registration
Register new client
client registration
client update
Register new client
register command
client registration
client update
Register new client
client registration
client update
OpenID Connect Dynamic Client Registration
OAuth 2.0 Dynamic Client Registration Management Protocol [RFC7592]
register
configuration option