AW.Webapi.Sample.Providers.ApplicationOAuthProvider.ValidateClientRedirectUri C# (CSharp) Method

ValidateClientRedirectUri() public method

public ValidateClientRedirectUri ( Microsoft.Owin.Security.OAuth.OAuthValidateClientRedirectUriContext context ) : System.Threading.Tasks.Task
context Microsoft.Owin.Security.OAuth.OAuthValidateClientRedirectUriContext
return System.Threading.Tasks.Task
        public override Task ValidateClientRedirectUri(OAuthValidateClientRedirectUriContext context)
        {
            if (context.ClientId == _publicClientId)
            {
                Uri expectedRootUri = new Uri(context.Request.Uri, "/");

                if (expectedRootUri.AbsoluteUri == context.RedirectUri)
                {
                    context.Validated();
                }
            }

            return Task.FromResult<object>(null);
        }