HttpServer.Server.OnAuthentication C# (CSharp) Method

OnAuthentication() protected method

Called before anything else.
Looks after a AuthorizationHeader in the request and will use the AuthenticationProvider if found.
protected OnAuthentication ( HttpServer.RequestContext context ) : void
context HttpServer.RequestContext The context.
return void
        protected virtual void OnAuthentication(RequestContext context)
        {
            var authHeader = (AuthorizationHeader) context.Request.Headers[AuthorizationHeader.NAME];
            if (authHeader != null)
                AuthenticationProvider.Authenticate(context.Request);
        }