Read() public méthode

public Read ( string httpMethod, string httpContentType, Uri requestUri, System incomingStream ) : OAuthMessage
httpMethod string
httpContentType string
requestUri System.Uri
incomingStream System
Résultat OAuthMessage
        /// <summary>
        /// Authorizes the specified refresh token.
        /// </summary>
        /// <param name="refreshToken">The refresh token.</param>
        public async Task AuthorizeAsync(string refreshToken)
        {
            var authorizeRequest = BuildAccessTokenRequest(refreshToken);

            var req = new HttpClient();
            var response = await req.PostAsync(authorizeRequest.BaseUri, new FormUrlEncodedContent(authorizeRequest.Parameters));

            var serializer = new OAuthMessageSerializer();

            var deserializedMessage = await serializer.Read(response);

            var message = deserializedMessage as AccessTokenResponse;
            if (message != null)
            {
                CurrentAccessToken = message;
                LastAccessTokenRefresh = DateTime.UtcNow;
            }

            var endUserAuthorizationFailedResponse = deserializedMessage as EndUserAuthorizationFailedResponse;
            if (endUserAuthorizationFailedResponse != null)
            {
                throw new SecurityException(endUserAuthorizationFailedResponse.ErrorDescription);
            }

            var userAuthorizationFailedResponse = deserializedMessage as ResourceAccessFailureResponse;
            if (userAuthorizationFailedResponse != null)
            {
                throw new SecurityException(userAuthorizationFailedResponse.ErrorDescription);
            }
        }