System.Net.Http.PrincipalHelper.SetPrincipal C# (CSharp) Method

SetPrincipal() static private method

static private SetPrincipal ( HttpRequestMessage request, IPrincipal principal ) : void
request HttpRequestMessage
principal IPrincipal
return void
        internal static void SetPrincipal(HttpRequestMessage request, IPrincipal principal)
        {
            // We authenticate the ongoing thread but also we stuff the principal on the message
            // after a brief chat with Glenn Block we understood that the only way to authenticate
            // a request and continue using it is to stuff it's authenticated user throught on
            // the message properties.
            request.Properties[MembershipAuthenticationHandler.MessagePrincipalKey] = principal;
        }