diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-02-23 07:01:16 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-02-23 07:01:16 -0800 |
commit | d1ef15d419f5235cc7266c9128790e20b92c5e58 (patch) | |
tree | 490e619bc91ba8f6afda7452b6b6d2c91478e0f8 /src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs | |
parent | 9618f15802a1e1d24fc5a61e8f58d7ee7ed75a9f (diff) | |
download | DotNetOpenAuth-d1ef15d419f5235cc7266c9128790e20b92c5e58.zip DotNetOpenAuth-d1ef15d419f5235cc7266c9128790e20b92c5e58.tar.gz DotNetOpenAuth-d1ef15d419f5235cc7266c9128790e20b92c5e58.tar.bz2 |
Added basic test for resource owner password authorizatino request. Not yet passing.
Diffstat (limited to 'src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs b/src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs index cefab0f..ee35b24 100644 --- a/src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs +++ b/src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs @@ -19,7 +19,9 @@ namespace DotNetOpenAuth.Test.OAuth2 { protected internal const string ClientSecret = "TestClientSecret"; - protected const string Username = "TestUser"; + protected const string ResourceOwnerUsername = "TestUser"; + + protected const string ResourceOwnerPassword = "TestUserPassword"; protected static readonly Uri ClientCallback = new Uri("http://client/callback"); @@ -40,7 +42,7 @@ namespace DotNetOpenAuth.Test.OAuth2 { var cryptoStore = new MemoryCryptoKeyStore(); authHostMock.Setup(m => m.GetClient(ClientId)).Returns(ClientDescription); authHostMock.SetupGet(m => m.CryptoKeyStore).Returns(cryptoStore); - authHostMock.Setup(m => m.IsAuthorizationValid(It.Is<IAuthorizationDescription>(d => d.ClientIdentifier == ClientId && d.User == Username))).Returns(true); + authHostMock.Setup(m => m.IsAuthorizationValid(It.Is<IAuthorizationDescription>(d => d.ClientIdentifier == ClientId && d.User == ResourceOwnerUsername))).Returns(true); return authHostMock; } } |