you might have to have a sperate jwt token generation logic and use that with yarp Route configuration you can have a policy and add it with your yarp
{
"ReverseProxy": {
"Routes": {
"route1" : {
"ClusterId": "cluster1",
"AuthorizationPolicy": "customPolicy",
"Match": {
"Hosts": [ "localhost" ]
}
}
},
"Clusters": {
"cluster1": {
"Destinations": {
"cluster1/destination1": {
"Address": "https://localhost:10001/"
}
}
}
}
}
}
for more refer https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/yarp/authn-authz?view=aspnetcore-9.0