예제 #1
0
        public ActionResult GetProxyAddress(string contextId, string accessToken, [FromBody] HostParameters parameters)
        {
            OperationContext context = new OperationContext(new Context(contextId, _logger));

            //  Use download token to authenticate.
            if (!_service.TryGetDownloadUrl(context, accessToken: accessToken, traceInfo: parameters.ToString()).Succeeded)
            {
                return(Unauthorized());
            }

            return(Ok(_service.GetProxyBaseAddress(context, parameters)));
        }