Cross-post from
Here
Clients: Java(Android)/Swift(iOS)
Use case:
On client -- All chanels are SSL protected, and we have a DB that stores our "token", which we call and send on reqests
On server -- We get JWT token in RequestHeaders, we validate it, if its valid Time,Issuer and Audience we populate the AuthContext, by coverting the ClaimsPrincipal I get out of the JWT token.
Problem:
AuthContext is internal and I cant populate it in my Interceptor?
Questions:
1. Can you populate the AuthContext somehow from a interceptor?
2. If you cant populate the AuthContext, how can I pass the useful information from the JWT to my RPC Method? (inital idea was to populate extra RequestHeaders, is that a good idea?)
Code example of my interceptor, can be found
Here