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
Post a Comment