SaiUpadhyayula / spring-boot-microservices

This repository contains the latest source code of th spring-boot-microservices tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

SauravK1996 opened this issue · 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

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

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.