Use Ocelot / Identity Server4 JwtBearerEvents.OnAuthenticationFailed addHeaders not work #2076
Replies: 8 comments 6 replies
-
What's the question? 😉 [17:38:39 INF] TWMSAuth was not authenticated. Failure message: IDX10223: Lifetime validation failed. The
token is expired. ValidTo: 'System.DateTime', Current time: 'System.DateTime'. The root cause is "The token is expired." Leo, if you use expired tokens why do you create issues in the repo? |
Beta Was this translation helpful? Give feedback.
-
Also, if you use .NET 8 then keep in mind #1876 !!! |
Beta Was this translation helpful? Give feedback.
-
I know "The token is expired.". |
Beta Was this translation helpful? Give feedback.
-
I can return the http response header added in OnAuthenticationFailed in my application |
Beta Was this translation helpful? Give feedback.
-
I found out, normally it is JwtBearerEvents.OnAuthenticationFailed |
Beta Was this translation helpful? Give feedback.
-
@raman-m please help me... |
Beta Was this translation helpful? Give feedback.
-
OK. What .NET SDK do you use? .NET 8 or lower? Again, my recommendation is 👇 Have you designed your infrastructure and services apps including identity management without Ocelot? |
Beta Was this translation helpful? Give feedback.
-
SDK:Net 6 It is normal to use it in a service application |
Beta Was this translation helpful? Give feedback.
-
ocelot app :http://localhost:5500
ocelot full log
Beta Was this translation helpful? Give feedback.
All reactions