Replies: 1 comment
-
|
Take a look at https://www.keycloak.org/server/reverseproxy |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have keycloak inside a docker container and a microservice architecture, in which I have a gateway with multiple endpoints. In those endpoints I use a middleware in which I made a request to "/auth/realms/testrealm/protocol/openid-connect/userinfo" so if the token is valid this endpoint give me a 200 and the request follow to the services, if is not valid the gateway return a 401.
So if I ask for a token directly to the keycloak container in "/auth/realms/testrealm/protocol/openid-connect/token" everything go fine and works.
Now I create an endpoint to ask for a token through the gateway, I have a response with the token but when I use it in an endpoint I receive :
"{"error":"invalid_token","error_description":"Token verification failed"}"The only different in the token that I can see is :
JWT token receive directly from the container
"iss": "http://localhost:8080/auth/realms/testrealm"
JWT token receive directly from the container
"iss": "http://localhost:5001/auth/realms/testrealm"
8080 is the keycloak service and 5001 gateway.
What can I do to make it work? I created the /auth/realms/testrealm endpoint just in case, but is not call.
Beta Was this translation helpful? Give feedback.
All reactions