public IActionResult Invoke(IRequestHandler requestHandler, string url)
        {
            IEndpointResolver endpointResolver = requestHandler.GetService <IEndpointResolver>();
            Endpoint          endpoint         = endpointResolver.GetEndpoint(requestHandler, url);

            if (endpoint == null)
            {
                return(null);
            }

            if (endpoint.DisallowAnonymous)
            {
                if (!requestHandler.HttpContext.User.Identity.IsAuthenticated || !this.HasRequiredClaims(requestHandler, endpoint))
                {
                    if (string.IsNullOrEmpty(endpoint.SignInUrl))
                    {
                        throw new HttpException(403, "Access denied.");
                    }

                    return((requestHandler as Controller).Redirect(endpoint.SignInUrl));
                }
            }

            IEndpoint endpointInstance = this.GetEndpointInstance(endpoint);

            if (endpointInstance == null)
            {
                return(null);
            }

            return(endpointInstance.Invoke(requestHandler, endpoint, endpointResolver.GetArguments(endpoint.UrlTemplate, url)));
        }