Exemple #1
0
        public async Task <(IOauthToken token, string owner)> ListenForResponse(IScope scope, AuthUrl authUrl)
        {
            IAuthResponse response = await responseManager.AwaitResponse(20000);

            if (authUrl.State != response.State)
            {
                throw new Exception("Invalid auth response state.");
            }

            IOauthToken token = await GetToken(response, authUrl, scope);

            IJwtToken jwtToken = await validationManager.ValidateTokenAsync(token);

            return(token, jwtToken.Name);
        }