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

Parameter authorizationDetails is not logged correctly #15

Open
pa-rw opened this issue Jul 30, 2024 · 1 comment
Open

Parameter authorizationDetails is not logged correctly #15

pa-rw opened this issue Jul 30, 2024 · 1 comment

Comments

@pa-rw
Copy link

pa-rw commented Jul 30, 2024

Parameter authorizationDetails is a JSON array of objects. To access individual objects, JSON.parse the string and iterate through its elements.

if (!authorizationDetails) {
//errors.push("no credentials requested");
console.log(`no credentials requested`);
} else if (authorizationDetails.credential_definition) {
console.log(
`credential ${authorizationDetails.credential_definition.type} was requested`
);
} else if (authorizationDetails.types) {
//EBSI style
console.log(`credential ${authorizationDetails.types} was requested`);
}

@endimion
Copy link
Collaborator

Hi, sorry for getting so long to get to this. I though it was simply a matter of logging...

In the staging branch, this is handled if not mistaken?

try {
if (authorizationDetails) {
authorizationDetails = JSON.parse(
decodeURIComponent(authorizationDetails)
);
} else {
console.log("authorization_details was missing");
}

so can we close this?

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