//-----------------------------------------------------------------------
//
// Copyright (c) Outercurve Foundation. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuth2.Messages {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotNetOpenAuth.Messaging;
///
/// A request from a Client to an Authorization Server to exchange the user's username and password for an access token.
///
internal class AccessTokenResourceOwnerPasswordCredentialsRequest : ScopedAccessTokenRequest {
///
/// Initializes a new instance of the class.
///
/// The access token endpoint.
/// The protocol version.
internal AccessTokenResourceOwnerPasswordCredentialsRequest(Uri accessTokenEndpoint, Version version)
: base(accessTokenEndpoint, version) {
}
///
/// Gets the type of the grant.
///
/// The type of the grant.
internal override GrantType GrantType {
get { return Messages.GrantType.Password; }
}
///
/// Gets or sets the user's account username.
///
/// The username on the user's account.
[MessagePart(Protocol.username, IsRequired = true)]
internal string UserName { get; set; }
///
/// Gets or sets the user's password.
///
/// The password.
[MessagePart(Protocol.password, IsRequired = true)]
internal string Password { get; set; }
}
}