spring-boot-microservices icon indicating copy to clipboard operation
spring-boot-microservices copied to clipboard

Getting 401 status code in api-gateway service when calling any end point from postman

Open SauravK1996 opened this issue 1 year ago • 2 comments

2023-05-23 13:00:24.776 DEBUG [api-gateway,,] 1 --- [or-http-epoll-1] o.s.s.oauth2.jwt.JwtClaimValidator : The iss claim is not valid 2023-05-23 13:00:24.782 DEBUG [api-gateway,,] 1 --- [or-http-epoll-1] o.s.s.w.s.a.AuthenticationWebFilter : Authentication failed: The iss claim is not valid

SauravK1996 avatar May 23 '23 13:05 SauravK1996

You should put in Access Token URL field on Postman "keyloack" hostname with port 8080.

najiboulhouch avatar Jun 17 '23 22:06 najiboulhouch

2023-05-23 13:00:24.776 DEBUG [api-gateway,,] 1 --- [or-http-epoll-1] o.s.s.oauth2.jwt.JwtClaimValidator : The iss claim is not valid 2023-05-23 13:00:24.782 DEBUG [api-gateway,,] 1 --- [or-http-epoll-1] o.s.s.w.s.a.AuthenticationWebFilter : Authentication failed: The iss claim is not valid

Check out Part-9 of the playlist video where it shows how to resolve the above error. It talks about mapping '127.0.0.1' to keycloak in the hosts file and replacing 'localhost' with 'keycloak' in the Access token URL in the postman request.

kanth5 avatar Feb 10 '24 08:02 kanth5