I responded in the stackoverflow post: https://stackoverflow.com/questions/52950210/populate-authcontext-in-grpc-c-sharp-from-jwt-authentication
On Wednesday, October 24, 2018 at 9:34:29 AM UTC+2, Ivan Penchev wrote: > > Cross-post from Here > <https://stackoverflow.com/questions/52950210/populate-authcontext-in-grpc-c-sharp-from-jwt-authentication> > > 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 > <https://stackoverflow.com/questions/52950210/populate-authcontext-in-grpc-c-sharp-from-jwt-authentication> > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/6c8a00fd-11df-494e-a5af-24a60ab2d90a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
