Skip to content

Add Authorization Details JSON input to Request Credential form#280

Open
reinkrul wants to merge 5 commits intomainfrom
request-credential-authorization-details
Open

Add Authorization Details JSON input to Request Credential form#280
reinkrul wants to merge 5 commits intomainfrom
request-credential-authorization-details

Conversation

@reinkrul
Copy link
Copy Markdown
Member

@reinkrul reinkrul commented May 4, 2026

Summary

  • Adds an expandable <details> section to the Request Credential modal containing a textarea for OpenID4VCI authorization_details JSON.
  • The textarea is optional — when filled, the contents are JSON-parsed (with inline error reporting) and included in the request body as authorization_details; when empty, the body is unchanged.

Test plan

  • Open Request Credential form; "Authorization Details (JSON)" section is collapsed by default and expands on click.
  • Submitting without any JSON works exactly as before.
  • Invalid JSON shows an inline error and blocks submission.
  • Valid JSON is parsed and forwarded to /internal/auth/v2/{subjectID}/request-credential as authorization_details.

Assisted by AI

reinkrul added 5 commits May 4, 2026 16:12
Reject non-array JSON or arrays containing non-object entries with
inline errors (matches the Nuts node API contract: array of objects).
Clear the parse/validation error reactively while the user edits, and
demote the placeholder from a computed property to a static data field.

Assisted by AI
The OpenID4VCI flow redirects back to the identity details page with
"error" (and optional "error_description") query parameters when the
issuer or Nuts node rejects the request. Surface them in a dedicated
banner and strip them from the URL so a refresh doesn't re-show.

Assisted by AI
The router uses hash mode, so the redirect_uri ends in
#/admin/identity/<id>. OAuth-compliant issuers append error and
error_description to the URL's query component (before the fragment),
so they land in window.location.search and are invisible to the
hash-based vue-router. Read from both locations and clean up both.

Assisted by AI
Render the OAuth error code as a small uppercase mono badge and the
description on its own line. Insert a newline before each ", word:"
fragment in the description so wrapped Go-style errors break onto
their own line.

Adds a default slot to ErrorMessage so callers can supply structured
body content; the existing message prop keeps working as the fallback.

Assisted by AI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant