asp.net mvc - How to Get a custom header value from an HttpAuthenticationContext -


i busy implementing , authentication filter:

public task authenticateasync(httpauthenticationcontext context, cancellationtoken cancellationtoken)     {         var request = context.request;          // receive token client. here example when token in header:         var token = request.headers.firstordefault(x => x.key == "token").value.tostring();   //["token"]; 

how header called token ? because above code doesn't work. guessing because not standard header.

request.headers.getvalues("token"); 

Comments

Popular posts from this blog

python - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -