Skip to content
Advertisement

Spring Cloud API Gateway JWT Issue Web Token Issue

I have a problem about sending any request to a defined service through api gateway with the usage of bearer token coming from login.

After login, I tried to send a request to a defined service but I got this issue in JWTAuthenticationFilter of api gateway shown below.

JavaScript

The exact location is in JWTUtils class with this line shown below.

JavaScript

How can I fix the issue?

Here is the repository : Link

Here is the screenshots : Link

Edited

After I added this dependency in pom.xml of api gateway shown below I got this issue. Here is the dependency

JavaScript

Here is the error:

JavaScript

Advertisement

Answer

After I revised some codes in JWTUTils in API Gateway, the issue disappeared.

Here is the solution

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement