This PR introduces the Pre-Authorized Code Flow as described in Section 3.5 of the OpenID4VCI specification. The flow is fully implemented from the perspective of the Wallet. From the Credential Issuer side there is still work to do.
A CredentialIssuerManager: oid4vc-manager/src/managers/credential_issuer.rs
A Server for CredentialIssuerManager: oid4vc-manager/src/servers/credential_issuer.rs
A Storage (oid4vc-manager/src/storage.rs) trait currently functions a helper trait and sort of represents the server api logic for the Credential Issuer.
The Authorization Code Flow is tested in oid4vc-manager/tests/oid4vci/authorization_code.rs, however it is not feature complete yet. This will be fixed in: #46.
The Pre-Authorized Code Flow is tested in oid4vc-manager/tests/oid4vci/pre_authorized_code.rs.
All Credential Format Profiles described in Appendix E of the OpenID4VCI spec are supported, as well as a mechanism to simple add more Profiles. This all can be found in oid4vci/src/credential_format_profiles/mod.rs.
The Wallet implementation can be found in oid4vci/src/wallet/mod.rs.
Description of change
This PR introduces the Pre-Authorized Code Flow as described in Section 3.5 of the OpenID4VCI specification. The flow is fully implemented from the perspective of the
Wallet
. From the Credential Issuer side there is still work to do.CredentialIssuerManager
:oid4vc-manager/src/managers/credential_issuer.rs
Server
forCredentialIssuerManager
:oid4vc-manager/src/servers/credential_issuer.rs
Storage
(oid4vc-manager/src/storage.rs
) trait currently functions a helper trait and sort of represents the server api logic for the Credential Issuer.oid4vc-manager/tests/oid4vci/authorization_code.rs
, however it is not feature complete yet. This will be fixed in: #46.oid4vc-manager/tests/oid4vci/pre_authorized_code.rs
.oid4vci/src/credential_format_profiles/mod.rs
.Wallet
implementation can be found inoid4vci/src/wallet/mod.rs
.Links to any relevant issues
46
closes #45
How the change has been tested
Two integration tests are added for both flows. They can be found in
oid4vc-manager/tests
. All/most new oid4vci related structs are extensively unit-tested (mainly (de)serialization) with the help of the oid4vci spec provided examples here: https://bitbucket.org/openid/connect/src/master/openid-4-verifiable-credential-issuance/examples/.Definition of Done checklist
Add an
x
to the boxes that are relevant to your changes.