Azi.Amazon.CloudDrive.AmazonDrive.ProcessRedirect C# (CSharp) Method

ProcessRedirect() private method

private ProcessRedirect ( HttpListenerContext context, string redirectUrl ) : Task
context System.Net.HttpListenerContext
redirectUrl string
return Task
        private async Task ProcessRedirect(HttpListenerContext context, string redirectUrl)
        {
            var error = HttpUtility.ParseQueryString(context.Request.Url.Query).Get("error_description");

            if (error != null)
            {
                throw new InvalidOperationException(error);
            }

            var code = HttpUtility.ParseQueryString(context.Request.Url.Query).Get("code");

            await SendResponse(context.Response, CloseTabResponse).ConfigureAwait(false);

            await AuthenticationByCode(code, redirectUrl).ConfigureAwait(false);
        }