ADORSYS-GIS / ADORSYS-GIS/cloud-wallet-ui
Presentation flow API client
- 主要語言
- TypeScript
- 星號
- 0
- 分支
- 0
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### Description
Create a stub API layer in `src/api/presentation.ts` so the UI can be built and tested before the backend OpenAPI spec is ready.
### Functions to stub
| Function | Description | Mock behaviour |
|---|---|---|
| `fetchAuthorizationRequest(uri)` | Resolves a `request_uri` to a parsed authorization request | Returns a hardcoded `ParsedAuthorizationRequest` |
| `presentCredential(request, credential, claims)` | Submits the VP token to the verifier | Resolves after 800ms, returns `{ status: 'ok' }` |
| `declinePresentation(request)` | Notifies the verifier the user declined | Resolves immediately |
### Acceptance criteria
- [ ] Functions are typed and exported from `src/api/presentation.ts`
- [ ] A `VITE_MOCK_PRESENTATION=true` env flag toggles between mock and real implementations
- [ ] All integration points in the flow use these functions, not inline fetch calls
- [ ] JSDoc comments describe expected request/response shapes per OID4VP §8
### Notes
OID4VP spec ref: §5 (Authorization Request), §8 (Response), §8.2 (direct_post).
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。