Sphereon-Opensource / OID4VC

OpenID for Verifiable Credentials - modules for issuers, holders and RPs
Apache License 2.0
65 stars 20 forks source link

feat: authorization request #28

Closed karimStekelenburg closed 1 year ago

karimStekelenburg commented 1 year ago

This PR adds functionality to make a request an access token using the scope parameter. Access token requests using the authorization_details parameter are currently not supported. It also adds a utility method to the OpenID4VCIClient class to construct and encode an authorization URL (the URL that points can be used to redirect the user to a login screen).

Funded by the Ontario Government

codecov-commenter commented 1 year ago

Codecov Report

Merging #28 (9bef399) into develop (8b16518) will decrease coverage by 1.98%. The diff coverage is 70.83%.

:exclamation: Current head 9bef399 differs from pull request most recent head dbd2ce5. Consider uploading reports for the commit dbd2ce5 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##           develop      #28      +/-   ##
===========================================
- Coverage    91.20%   89.22%   -1.98%     
===========================================
  Files           17       17              
  Lines          625      668      +43     
  Branches       148      170      +22     
===========================================
+ Hits           570      596      +26     
- Misses          55       69      +14     
- Partials         0        3       +3     
Flag Coverage Δ
unittest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/types/Generic.types.ts 100.00% <ø> (ø)
lib/AccessTokenClient.ts 78.99% <57.57%> (-13.06%) :arrow_down:
lib/OpenID4VCIClient.ts 76.00% <100.00%> (+2.72%) :arrow_up:
lib/types/Authorization.types.ts 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

karimStekelenburg commented 1 year ago

Hi @nklomp, thanks for the review! I've made the requested changes.

Please let me know if I missed anything or misunderstood.

nklomp commented 1 year ago

Thanks for the contribution