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?
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 usingnest-keycloak-connect
we where wondering if there was a way to access the token from it. Something similar to thekeycloak.getToken()
from https://www.npmjs.com/package/keycloak-angular. Is there a way to do this?