mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-08 07:49:51 -06:00
Fix doc(oid4vc): Correct realm-attributes example and update HTTP method in docs (#39409)
Closes #39264 Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
This commit is contained in:
@@ -130,9 +130,9 @@ Create a JSON file (e.g., `realm-attributes.json`) with the following content:
|
||||
{
|
||||
"realm": "oid4vc-vci",
|
||||
"enabled": true,
|
||||
"preAuthorizedCodeLifespanS": 120,
|
||||
"issuerDid": "https://localhost:8443/realms/oid4vc-vci",
|
||||
"attributes": {
|
||||
"preAuthorizedCodeLifespanS": 120,
|
||||
"issuerDid": "https://localhost:8443/realms/oid4vc-vci",
|
||||
"vc.IdentityCredential.expiry_in_s": "31536000",
|
||||
"vc.IdentityCredential.format": "vc+sd-jwt",
|
||||
"vc.IdentityCredential.scope": "identity_credential",
|
||||
@@ -156,9 +156,9 @@ This is a **sample configuration**. You can define **additional attributes** dep
|
||||
|
||||
==== Attribute Breakdown
|
||||
|
||||
The attributes section contains issuer-specific and credential-specific metadata:
|
||||
- **preAuthorizedCodeLifespanS** – Defines how long pre-authorized codes remain valid (in seconds).
|
||||
- **issuerDid** – The Decentralized Identifier (DID) of the issuer.
|
||||
- **attributes** – Contains VC-specific metadata, which can be **expanded** as needed:
|
||||
- **expiry_in_s** – Credential expiration time (in seconds).
|
||||
- **format** – Defines the VC format (e.g., `vc+sd-jwt`).
|
||||
- **scope** – Identifies the credential’s scope.
|
||||
@@ -171,7 +171,7 @@ Use the following `curl` command to import the attributes into {project_name}:
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
curl -X POST "https://localhost:8443/admin/realms/oid4vc-vci" \
|
||||
curl -X PUT "https://localhost:8443/admin/realms/oid4vc-vci" \
|
||||
-H "Authorization: Bearer $ACCESS_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d @realm-attributes.json
|
||||
@@ -181,7 +181,6 @@ curl -X POST "https://localhost:8443/admin/realms/oid4vc-vci" \
|
||||
====
|
||||
- Replace `$ACCESS_TOKEN` with a valid **{project_name} Admin API access token**.
|
||||
- **Avoid using `-k` in production**; instead, configure a **trusted TLS certificate**.
|
||||
- If updating an existing realm, use `PUT` instead of `POST`.
|
||||
====
|
||||
|
||||
=== Create Client Scopes with Mappers
|
||||
|
||||
Reference in New Issue
Block a user