Comments (4)
Hi @ejossev Thanks for the bugreport.
Not entirely sure if I get it right, because IMO the current resolution logic does not contradict the spec. Your remark seems to be addressed in the else branch of the expression.
The if branch will only be triggered if we do get the OID4VCI metadata and only if it does not have a token_endpoint
in it (something which isn't in the spec but seen in the wild) but does have the optional authorization_server
value in it. This means it If that is the case we use the AS value to retrieve AS metadata and that should also provide the token endpoint. If we cannot resolve that well-known we raise an error, because now we have an OIDVCI issuer stating it has a separate AS at a specific location, but we could not retrieve its well-known metadata.
In all other cases we start fetching the OIDC and OAuth2 well-known metadata, see line 68. Then as a last step we double check whether we did find a token_endpoint
, so first via OIDV4CI, then OIDC and then OAuth2. If that fails we throw an error, because we cannot find it.
I do believe we should also check for OIDC in case a separate AS is provided, and at one point it would be wise to stop support for a token_endpoint
in the OID4VCI issuer metadata altogether. I also believe we need to change the logic a bit for Authorized code flows, because right now we are only interested in the token_endpoint
and for the Authorized Flow we would also require either OAuth or OIDC metadata
edit:
Oh %$#%$#, sorry the else branch is at a different scope. Yeah that for sure isn't correct it seems. We will have a look at it
from oid4vci.
We will also split the OAuth2/OIDC metadata from the OID4VCI metadata, as that was fine and handy initially but will need to be done anyway for Authorized code flows
from oid4vci.
Thanks for reporting. The logic has been overhauled and now is both more flexible as wall as better in line with the spec. Will be released in the new version momentarily
from oid4vci.
Thanks, seems better now.
Have a nice day ;)
from oid4vci.
Related Issues (20)
- Link to spec that is no longer compatible with this library HOT 5
- 'isValidURL' returns false on valid URL HOT 5
- `determineSpecVersionFromURI` error HOT 1
- `getIssuerFromCredentialOfferPayload` error HOT 3
- Mattr Labs v11 issuer throws 400 on credential request HOT 2
- A few type issues from Draft 13 HOT 1
- token_endpoint not added to the metadata HOT 2
- OIDC4VCI is not passing endpointOpts.getCrendentialOfferOpts HOT 2
- Remove support for versions below draft 11 HOT 5
- Separate generic format definitions and the format specific interfaces HOT 1
- Leverage zod (or similar library) for validation HOT 1
- Specific reason why JSON-LD issuance is not supported? HOT 2
- Accept RSA Signing Algorithms HOT 6
- Re-run CI on main to publish new `.next` version HOT 2
- Access token not verified in the credential endpoint implementation HOT 1
- `credential_offer_uri=` hosted credential url should be uri encoded in the credential offer
- cNonce is not checked for expiration
- Missing support for latest draft 13 HOT 5
- Utilize nonce from server response for subsequent client calls HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oid4vci.