-
Notifications
You must be signed in to change notification settings - Fork 59
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
Wallet API list credentials wrong results #843
Comments
The credentialals endpoint you mention is meant to list the credentials, that have been issued to your wallet. Not yhe credentials offered by any issuer. If you created a new wallet, the empty list is the expected behaviour. |
the buggy endpoint is: /wallet-api/wallet/{wallet}/issuers/{issuer}/credentials Working on a solution... |
Sorry, but I do not think that this is correct. The endpoint /wallet-api/wallet/{wallet}/issuers/{issuer}/credentials, (you are right, this should be the correct endpoint) call in the background the endpoint /.well-known/openid-credential-issuer from the issuer. This last endpoint, list all the available credential offered (not issued) by the issuer to anyone and therefore also to this specific wallet. So the possibilities are two: either the implementation is incorrect according to the intention or the implementation is correct but then the intention is wrong. |
Like I said, the endpoint listing the credentials of an issuer is indeed not working as intended, and I'm currently working on a solution. |
A fix has been implemented with this pull request: #863 |
Thank you |
Describe the bug
The list credential endpoint of the Wallet API return an empty list of credentials.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A list of 26 credentials
Actual behavior
An empty list
Additional context
I think, the issue is in method fetchCredentials from the class IssuerUseCaseImpl. This method get the credentials from the /.well-known/openid-credential-issuer, but expect to find the types of the credential from the property "types" on the root of the json object while in reality this property (but in sigular - "type") is a child of property "credential_definition".
Not beeing able to find that property, the method ends up filtering all the credentials and gives back an empty list.
The text was updated successfully, but these errors were encountered: