Skip to content
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

Credential response type is incorrect #38

Open
TimoGlastra opened this issue May 14, 2023 · 1 comment
Open

Credential response type is incorrect #38

TimoGlastra opened this issue May 14, 2023 · 1 comment
Assignees

Comments

@TimoGlastra
Copy link
Contributor

TimoGlastra commented May 14, 2023

What

The credential property in the credential response is typed as CredentialFormatProfileOrEncoded, where it can be either an encoded string, or a CredentialFormatProfile. However, the CredentialFormatProfile type is the type used for the credentials_supported and credentials from the credential offer / credential issuer metadata, which is not the same structure that is being used in the credential response (that should contain the actual credential.

For the types the credential response can be, we should look at the defined credential format profiles and what their return type should be.

It seems that for the two JWT formats it's a JWT string (so not just base64url, as there's . in it), for JSON-LD it's the json of a credential. For iso mdl, it is indeed a base64-url encoded string.

I think we should extend the credential respnose to also have credential format specific properties

@berendsliedrecht
Copy link
Contributor

Working on this now, and if we want to add this the user must supply the credential as well to the evaluate function, along with everything else, which might be a bit odd. Two alternatives that I can think of:

  1. Remove the credential return value and jus return subject_id and proof_of_posession.
  2. Do step 1 and add a method that takes a credential and returns its representation according to the specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants