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

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -