ferrerojosh / nest-keycloak-connect

keycloak-nodejs-connect module for Nest
MIT License
318 stars 123 forks source link

Question: Is there a way to access the keycloak token after it was verified? #145

Closed StefanKern closed 1 month ago

StefanKern commented 1 year ago

Background: We are having a a backend with a lot of "microservices" and each of those services is protected via keycloak as well. Now I can get the "Authorization" key via the @Request() but the further I go away from the original method the more tedious it gets to access the token. Now since we are also using nest-keycloak-connect we where wondering if there was a way to access the token from it. Something similar to the keycloak.getToken() from https://www.npmjs.com/package/keycloak-angular. Is there a way to do this?

ferrerojosh commented 1 year ago

As of now there isn't a way. It can be made possible I think.