I have a web app with Angular in Frontend, NodeJS in Backend and Keycloak as an identity management solution.
My Frontend stores the access- and id-token. All the NodeJS routes are protected by keycloak (bearer only). That's why I intercepted on each of my requests the access-token as bearer in the header:
setHeaders: { Authorization: 'Bearer ' + this.oauthService.getAccessToken() }
Now I'm able to authorize the requests, but how I can get the user Information in Backend?
At least only an ID is necessary to make user-dependent DB requests. Is it possible to get any information from the access token?
Or does the NodeJS connector (keycloak-connect) get this information itself so that I can save it in a session? What is the best way to do it?