Skip to content

Commit a08abd3

Browse files
authored
Merge pull request #311 from niscy-eudiw/main
Enhance document reissuance functionality with background-only option
2 parents b986f98 + e7b096a commit a08abd3

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ let newDocs = try await wallet.issueDocumentsByOfferUrl(
424424
)
425425
```
426426

427+
428+
427429
### Authorization code flow
428430

429431
For the authorization code flow to work, the redirect URI must be specified specified by setting the the `openID4VciRedirectUri` property.

Sources/EudiWalletKit/EudiWalletKit.docc/IssueDocuments.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,25 @@ let issuedDoc = try await wallet.requestDeferredIssuance(
189189
```
190190

191191
### Document Reissuance
192-
- Added `reissueDocument(documentId:credentialOptions:keyOptions:promptMessage:)` method to `EudiWallet` for reissuing an existing document using previously stored issuance metadata and authorization data.
193-
- Retrieves the document's metadata from storage and resolves the appropriate OpenID4VCI service via the credential issuer identifier.
194-
- If persisted authorization data is available, it is forwarded to the service to avoid re-authentication.
195-
- Falls back to the original issuance metadata for `credentialOptions` and `keyOptions` when not explicitly provided.
192+
193+
Use the `reissueDocument(documentId:credentialOptions:keyOptions:promptMessage:backgroundOnly:)` method to reissue an existing document using previously stored issuance metadata and authorization data.
194+
195+
- Retrieves the document's metadata from storage and resolves the appropriate OpenID4VCI service via the credential issuer identifier.
196+
- If persisted authorization data is available, it is forwarded to the service to avoid re-authentication.
197+
- Falls back to the original issuance metadata for `credentialOptions` and `keyOptions` when not explicitly provided.
198+
- When `backgroundOnly` is set to `true`, reissuance only proceeds if stored authorization data is available. If no stored authorization exists, an error is thrown. This is useful for automatic credential refresh without user interaction.
196199

197200
```swift
201+
// Interactive reissuance (default) - may prompt the user for authentication
198202
let reissued = try await wallet.reissueDocument(
199203
documentId: existingDocument.id,
200204
credentialOptions: credentialOptions, // optional, defaults to original
201205
keyOptions: keyOptions, // optional, defaults to original
202206
)
207+
208+
// Background reissuance - only succeeds if stored authorization exists
209+
let reissued = try await wallet.reissueDocument(
210+
documentId: existingDocument.id,
211+
backgroundOnly: true,
212+
)
203213
```

changelog.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
## v0.23.1
2+
3+
### Background Reissuance and DPoP Propagation
4+
- Added `backgroundOnly` parameter to `reissueDocument` method. When set to `true`, reissuance only proceeds if stored authorization data is available; otherwise it throws an error. This enables automatic credential refresh without user interaction.
5+
- DPoP key ID is now propagated through the issuance flow and persisted in document metadata, enabling DPoP-protected refresh and reissuance flows.
6+
7+
```swift
8+
let reissued = try await wallet.reissueDocument(
9+
documentId: existingDocument.id,
10+
backgroundOnly: true, // only reissue if stored auth exists
11+
credentialOptions: credentialOptions, // optional, defaults to original
12+
keyOptions: keyOptions, // optional, defaults to original
13+
)
14+
15+
16+
// Background reissuance - only succeeds if stored authorization exists
17+
let reissued = try await wallet.reissueDocument(
18+
documentId: existingDocument.id,
19+
backgroundOnly: true,
20+
)
21+
22+
```
23+
24+
25+
26+
### KB-JWT Fix for Decentralized Identifier Scheme
27+
- Fixed issue where KB-JWT `aud` claim used a stripped DID instead of the full `client_id` for the `decentralized_identifier` scheme. The session transcript and KB-JWT now correctly include the resolved client identifier. Fixes [#308](https://github.com/eu-digital-identity-wallet/eudi-lib-ios-wallet-kit/issues/308).
28+
29+
### Dependency Updates
30+
- `eudi-lib-sdjwt-swift` updated to 0.14.1
31+
- `eudi-lib-ios-siop-openid4vp-swift` updated to 0.30.1
32+
- `eudi-lib-ios-iso18013-data-transfer` updated to 0.11.2
33+
- `eudi-lib-ios-statium-swift` updated to 0.4.0
34+
35+
136
## v0.23.0
237

338
### Document Reissuance

0 commit comments

Comments
 (0)