Example #1
0
        public Task <GetTokenResult> ExecuteAsync(Uri tokenUri)
        {
            if (tokenUri == null)
            {
                throw new ArgumentNullException(nameof(tokenUri));
            }

            if (_requestBuilder.Certificate != null)
            {
                return(_postTokenOperation.ExecuteAsync(_requestBuilder.Content,
                                                        tokenUri,
                                                        _requestBuilder.AuthorizationHeaderValue,
                                                        _requestBuilder.Certificate));
            }

            return(_postTokenOperation.ExecuteAsync(_requestBuilder.Content,
                                                    tokenUri,
                                                    _requestBuilder.AuthorizationHeaderValue));
        }