-
Notifications
You must be signed in to change notification settings - Fork 239
feat: support deferred credential issuance #2350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support deferred credential issuance #2350
Conversation
🦋 Changeset detectedLatest commit: 241cb57 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
4c605d4
to
15a5399
Compare
8898837
to
c29cb03
Compare
@TimoGlastra I'm opening this for review. Please note that there are still some open questions that I was hoping getting some feedback on: #2350 (comment) |
packages/openid4vc/src/openid4vc-holder/OpenId4VciHolderService.ts
Outdated
Show resolved
Hide resolved
c29cb03
to
e90c3ff
Compare
packages/openid4vc/src/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.ts
Outdated
Show resolved
Hide resolved
packages/openid4vc/src/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.ts
Outdated
Show resolved
Hide resolved
packages/openid4vc/src/openid4vc-issuer/OpenId4VcIssuanceSessionState.ts
Outdated
Show resolved
Hide resolved
packages/openid4vc/src/openid4vc-issuer/OpenId4VcIssuerService.ts
Outdated
Show resolved
Hide resolved
packages/openid4vc/src/openid4vc-issuer/OpenId4VcIssuerServiceOptions.ts
Outdated
Show resolved
Hide resolved
packages/openid4vc/src/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.ts
Outdated
Show resolved
Hide resolved
packages/openid4vc/src/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.ts
Outdated
Show resolved
Hide resolved
packages/openid4vc/src/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.ts
Outdated
Show resolved
Hide resolved
Partial issuance is something we added in Credo. It's if you offer multiple configurations in a offer, and only a subset of those have been issued. Every issuance flow that offers multiple credentials will reach this state, so yes I'd say we have to make them compatible with each other.
This is a good question. We could make them live longer, but i think we should also consider to add support for refresh tokens. (this will enable credential refresh, something we want to support as well). Using a refresh token you can get a new access token. Some considerations to this:
We use it in e.g. Paradym to remove expired sessions. So i think we should update this as well. But we probably want to have longer expiration for the deferred issuance than the issuance session as a whole 🤔 |
ea52111
to
ca620f4
Compare
Also mainly a question on the overall flow. If you want to use deferred issuance in credo you should:
|
Yes, and transaction id. I considered generating the transaction id in Credo itself, but that'd make it more complicated, since we'd need to "give" that information back to the implementer.
Yes.
Yes |
Makes sense, users just need to be careful to genreate unique transaction ids since it can cause issues if they clash |
90b8a0b
to
dbf356a
Compare
At the moment, Update: I introduced a
This accounts for multiple deferred credentials with potentially longer intervals, hence we keep checking what's currently set as expiry time. |
d1e773a
to
fb6db25
Compare
I will work on adding support for refresh tokens on https://github.com/openwallet-foundation-labs/oid4vc-ts |
We can also add it in another PR, since we won't have to change the logic for deferred issuance for it |
@TimoGlastra yes, let's merge this one first. I will work on the refresh tokens in. a separate PR. |
packages/openid4vc/src/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.ts
Outdated
Show resolved
Hide resolved
packages/openid4vc/src/openid4vc-issuer/OpenId4VcIssuerServiceOptions.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Henrique Dias <mail@hacdias.com>
Signed-off-by: Henrique Dias <mail@hacdias.com>
Signed-off-by: Henrique Dias <mail@hacdias.com>
Signed-off-by: Henrique Dias <mail@hacdias.com>
Signed-off-by: Henrique Dias <mail@hacdias.com>
Signed-off-by: Henrique Dias <mail@hacdias.com>
Signed-off-by: Henrique Dias <mail@hacdias.com>
Signed-off-by: Henrique Dias <mail@hacdias.com>
bfbf411
to
fabad07
Compare
@TimoGlastra just rebased with latest updates from |
Signed-off-by: Henrique Dias <mail@hacdias.com>
fabad07
to
241cb57
Compare
cfc2ac4
into
openwallet-foundation:main
Hey @hacdias , I ran into a couple of runtime errors while testing credential retrieval from an offer. Initially I got,
After converting
It looks like in some code paths these fields are |
Signed-off-by: Henrique Dias <mail@hacdias.com> Signed-off-by: Ariel Gentile <gentilester@gmail.com>
This PR adds support fopr deferred credential issuance within the OpenID4VCI specification. Some notes:
There are still a few small questions left to answer:
Are deferred and partial issuance compatible with each other? I assumed that no, since the specification was not clear enough for me. However, if they are compatible, I need to update the code to allow multiple transaction IDs per issuance session.I did not change anything in the validity of an issuance session. On the deferred credential issuance endpoint, I just do not check for the expiration time, since it's no longer relevant. Is there any cleanup of the issuance session repository? Do I need to make sure it does not get deletedr in some way?