Skip to content

Release 0.26.0#314

Merged
sraptis-scy merged 9 commits intoeu-digital-identity-wallet:mainfrom
niscy-eudiw:chore/backport-hotfix
Apr 15, 2026
Merged

Release 0.26.0#314
sraptis-scy merged 9 commits intoeu-digital-identity-wallet:mainfrom
niscy-eudiw:chore/backport-hotfix

Conversation

@sraptis-scy
Copy link
Copy Markdown
Collaborator

New Feature: Credential Re-Issuance (reissueDocument)

Added support for re-issuing previously issued credentials without requiring the user to go through
the full OAuth authorization flow again. The library automatically captures and stores the
authorization context (tokens, endpoints, key aliases) after successful credential issuance,
enabling seamless credential refresh using the stored refresh token.

API

OpenId4VciManager.reissueDocument()

New method on OpenId4VciManager for re-issuing a credential:

fun reissueDocument(
    documentId: DocumentId,
    allowAuthorizationFallback: Boolean = true,
    executor: Executor? = null,
    onIssueEvent: OnIssueEvent,
)
  • Interactive mode (default): If tokens are expired, falls back to full OAuth authorization
    (opens browser).
  • Background mode (allowAuthorizationFallback = false): If tokens are expired, delivers a
    ReissuanceAuthorizationException via IssueEvent.Failure instead of opening a browser. Designed
    for WorkManager or other background execution contexts.

ReissuanceAuthorizationException

New public exception class (eu.europa.ec.eudi.wallet.issue.openid4vci.reissue.ReissuanceAuthorizationException)
thrown when background re-issuance fails due to expired tokens. Wallet applications can check for
this exception type to schedule interactive re-authorization later.

Configuration

OpenId4VciManager.Config.Builder.withIssuanceMetadataStorage()

Optional configuration for the storage backend used to persist re-issuance metadata. When not
configured, defaults to an AndroidStorage instance in the app's no-backup files directory.

Flow

  1. Initial Issuance: After a credential is successfully issued, ProcessResponse stores
    IssuanceMetadata (endpoints, tokens, key aliases) in the configured storage.
  2. Re-Issuance: reissueDocument(documentId) loads the stored metadata, reconstructs the
    authorized request, creates a fresh Issuer (reusing the original DPoP key), and submits a new
    credential request.
  3. Token Expiry Handling: If the credential request fails with a 401/InvalidToken error:
    • Interactive mode: Falls back to full OAuth authorization and retries.
    • Background mode: Throws ReissuanceAuthorizationException.
  4. Document Lifecycle: On successful immediate issuance, the old document is deleted
    automatically. For deferred outcomes, the old document is retained until the deferred credential
    is eventually issued.

@sonarqubecloud
Copy link
Copy Markdown

@sraptis-scy sraptis-scy merged commit a2f94d0 into eu-digital-identity-wallet:main Apr 15, 2026
6 checks passed
@sraptis-scy sraptis-scy deleted the chore/backport-hotfix branch April 15, 2026 11:25
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.

2 participants