//-----------------------------------------------------------------------
//
// Copyright (c) Outercurve Foundation. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuth2.Messages {
using System;
using System.Collections.Generic;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OAuth2.ChannelElements;
///
/// A request from the client to the token endpoint for a new access token
/// in exchange for a refresh token that the client has previously obtained.
///
internal class AccessTokenRefreshRequest : ScopedAccessTokenRequest {
///
/// Initializes a new instance of the class.
///
/// The token endpoint.
/// The version.
protected AccessTokenRefreshRequest(Uri tokenEndpoint, Version version)
: base(tokenEndpoint, version) {
}
///
/// Gets or sets the refresh token.
///
/// The refresh token.
///
/// REQUIRED. The refresh token associated with the access token to be refreshed.
///
[MessagePart(Protocol.refresh_token, IsRequired = true)]
internal string RefreshToken { get; set; }
///
/// Gets the type of the grant.
///
/// The type of the grant.
internal override GrantType GrantType {
get { return Messages.GrantType.RefreshToken; }
}
}
}