Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

fix: use grantManager to parse token in onSubscriptionConnect #56

Merged
merged 2 commits into from Jan 7, 2020

Conversation

darahayes
Copy link
Contributor

No description provided.

@darahayes darahayes force-pushed the createGrant branch 2 times, most recently from c888153 to d095a90 Compare January 6, 2020 15:33
@darahayes
Copy link
Contributor Author

fixes #13

@darahayes darahayes changed the title breaking: use grantManager to parse token in onSubscriptionConnect fix: use grantManager to parse token in onSubscriptionConnect Jan 6, 2020
@darahayes
Copy link
Contributor Author

Originally, the PR had some changes that were breaking but I've managed to reduce it down so we get what we need but there are no breaking changes.

@darahayes darahayes requested a review from wtrocki January 6, 2020 16:03
return new Token(token, clientId)
const tokenString = header.substring(7)
return {
access_token: tokenString
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Trivial] FieldName is not conforming to standards.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah so this is the format required by the keycloak.grantmanager.createGrant perhaps it would be better to return just the tokenString value here and then explicitly pass {access_token: tokenString} into that method call to make things clearer.

Copy link
Contributor

@wtrocki wtrocki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed more time to get that checked.
Really good work!

@darahayes darahayes merged commit 039199e into master Jan 7, 2020
@darahayes darahayes deleted the createGrant branch January 7, 2020 09:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants