aerogear / keycloak-connect-graphql

Add Keyloak Authentication and Authorization to your GraphQL server.
Apache License 2.0
157 stars 23 forks source link

Remove the need for Token.js #13

Closed darahayes closed 4 years ago

darahayes commented 5 years ago

src/KeycloakToken.ts is a direct copy of the Token class within the keycloak-nodejs-connect library. We copied it because the Keycloak library does not expose that class directly.

However, I have found keycloak.grantManager.createGrant is the more correct way for us to parse and validate the token. If we use this inside the KeycloakSubscriptionHandler, then we can completely remove the Token class.