summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Test')
-rw-r--r--src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs2
-rw-r--r--src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs2
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs5
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs10
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs5
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs2
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs6
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs7
8 files changed, 21 insertions, 18 deletions
diff --git a/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs b/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs
index 04c63ef..4b02089 100644
--- a/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs
+++ b/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs
@@ -31,7 +31,7 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings {
base.SetUp();
this.protocol = Protocol.Default;
- this.nonceStore = new NonceMemoryStore(TimeSpan.FromHours(3));
+ this.nonceStore = new MemoryNonceStore(TimeSpan.FromHours(3));
this.nonceElement = new StandardReplayProtectionBindingElement(this.nonceStore);
this.nonceElement.Channel = new Mocks.TestChannel();
this.message = new TestReplayProtectedMessage();
diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
index fdf652c..629ca46 100644
--- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
+++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
@@ -36,7 +36,7 @@ namespace DotNetOpenAuth.Test.OAuth.ChannelElements {
base.SetUp();
this.signingElement = new RsaSha1ServiceProviderSigningBindingElement(new InMemoryTokenManager());
- this.nonceStore = new NonceMemoryStore(StandardExpirationBindingElement.MaximumMessageAge);
+ this.nonceStore = new MemoryNonceStore(StandardExpirationBindingElement.MaximumMessageAge);
this.channel = new OAuthServiceProviderChannel(this.signingElement, this.nonceStore, new InMemoryTokenManager(), this.serviceProviderSecuritySettings, new TestMessageFactory(), this.HostFactories);
}
diff --git a/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs b/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
index 6e3d7dc..227d6ca 100644
--- a/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
@@ -9,6 +9,7 @@ namespace DotNetOpenAuth.Test.OpenId {
using System.Threading;
using System.Threading.Tasks;
using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.Messaging.Bindings;
using DotNetOpenAuth.OpenId;
using DotNetOpenAuth.OpenId.Messages;
using DotNetOpenAuth.OpenId.Provider;
@@ -327,8 +328,8 @@ namespace DotNetOpenAuth.Test.OpenId {
Association rpAssociation = null, opAssociation;
AssociateSuccessfulResponse associateSuccessfulResponse = null;
AssociateUnsuccessfulResponse associateUnsuccessfulResponse = null;
- var relyingParty = new OpenIdRelyingParty(new StandardRelyingPartyApplicationStore(), this.HostFactories);
- var provider = new OpenIdProvider(new StandardProviderApplicationStore(), this.HostFactories) {
+ var relyingParty = new OpenIdRelyingParty(new MemoryCryptoKeyAndNonceStore(), this.HostFactories);
+ var provider = new OpenIdProvider(new MemoryCryptoKeyAndNonceStore(), this.HostFactories) {
SecuritySettings = this.ProviderSecuritySettings
};
Handle(opDescription.Uri).By(
diff --git a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs
index 1bc65e5..871eb78 100644
--- a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs
@@ -66,10 +66,10 @@ namespace DotNetOpenAuth.Test.OpenId {
[Test]
public async Task UnsolicitedAssertion() {
- var opStore = new StandardProviderApplicationStore();
+ var opStore = new MemoryCryptoKeyAndNonceStore();
Handle(RPUri).By(
async req => {
- var rp = new OpenIdRelyingParty(new StandardRelyingPartyApplicationStore(), this.HostFactories);
+ var rp = new OpenIdRelyingParty(new MemoryCryptoKeyAndNonceStore(), this.HostFactories);
IAuthenticationResponse response = await rp.GetResponseAsync(req);
Assert.That(response, Is.Not.Null);
Assert.AreEqual(AuthenticationStatus.Authenticated, response.Status);
@@ -97,10 +97,10 @@ namespace DotNetOpenAuth.Test.OpenId {
[Test]
public async Task UnsolicitedAssertionRejected() {
- var opStore = new StandardProviderApplicationStore();
+ var opStore = new MemoryCryptoKeyAndNonceStore();
Handle(RPUri).By(
async req => {
- var rp = new OpenIdRelyingParty(new StandardRelyingPartyApplicationStore(), this.HostFactories);
+ var rp = new OpenIdRelyingParty(new MemoryCryptoKeyAndNonceStore(), this.HostFactories);
rp.SecuritySettings.RejectUnsolicitedAssertions = true;
IAuthenticationResponse response = await rp.GetResponseAsync(req);
Assert.That(response, Is.Not.Null);
@@ -132,7 +132,7 @@ namespace DotNetOpenAuth.Test.OpenId {
/// </summary>
[Test]
public async Task UnsolicitedDelegatingIdentifierRejection() {
- var opStore = new StandardProviderApplicationStore();
+ var opStore = new MemoryCryptoKeyAndNonceStore();
Handle(RPUri).By(
async req => {
var rp = this.CreateRelyingParty();
diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs
index ca0e4b4..ac8eed2 100644
--- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/ExtensionsBindingElementTests.cs
@@ -14,6 +14,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements {
using System.Threading.Tasks;
using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.Messaging.Bindings;
using DotNetOpenAuth.OpenId;
using DotNetOpenAuth.OpenId.ChannelElements;
using DotNetOpenAuth.OpenId.Extensions;
@@ -121,12 +122,12 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements {
[Test]
public async Task ExtensionsAreIdentifiedAsSignedOrUnsigned() {
Protocol protocol = Protocol.Default;
- var opStore = new StandardProviderApplicationStore();
+ var opStore = new MemoryCryptoKeyAndNonceStore();
int rpStep = 0;
Handle(RPUri).By(
async req => {
- var rp = new OpenIdRelyingParty(new StandardRelyingPartyApplicationStore(), this.HostFactories);
+ var rp = new OpenIdRelyingParty(new MemoryCryptoKeyAndNonceStore(), this.HostFactories);
RegisterMockExtension(rp.Channel);
switch (++rpStep) {
diff --git a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs
index c9cd52c..a9d469a 100644
--- a/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/ChannelElements/OpenIdChannelTests.cs
@@ -30,7 +30,7 @@ namespace DotNetOpenAuth.Test.OpenId.ChannelElements {
[SetUp]
public void Setup() {
- this.channel = new OpenIdRelyingPartyChannel(new MemoryCryptoKeyStore(), new NonceMemoryStore(maximumMessageAge), new RelyingPartySecuritySettings(), this.HostFactories);
+ this.channel = new OpenIdRelyingPartyChannel(new MemoryCryptoKeyStore(), new MemoryNonceStore(maximumMessageAge), new RelyingPartySecuritySettings(), this.HostFactories);
}
[Test]
diff --git a/src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs b/src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs
index 4dd7f3a..cddf187 100644
--- a/src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs
@@ -151,7 +151,7 @@ namespace DotNetOpenAuth.Test.OpenId {
internal void RegisterAutoProvider() {
this.Handle(OPUri).By(
async (req, ct) => {
- var provider = new OpenIdProvider(new StandardProviderApplicationStore(), this.HostFactories);
+ var provider = new OpenIdProvider(new MemoryCryptoKeyAndNonceStore(), this.HostFactories);
return await this.AutoProviderActionAsync(provider, req, ct);
});
}
@@ -322,7 +322,7 @@ namespace DotNetOpenAuth.Test.OpenId {
/// <param name="stateless">if set to <c>true</c> a stateless RP is created.</param>
/// <returns>The new instance.</returns>
protected OpenIdRelyingParty CreateRelyingParty(bool stateless) {
- var rp = new OpenIdRelyingParty(stateless ? null : new StandardRelyingPartyApplicationStore(), this.HostFactories);
+ var rp = new OpenIdRelyingParty(stateless ? null : new MemoryCryptoKeyAndNonceStore(), this.HostFactories);
return rp;
}
@@ -331,7 +331,7 @@ namespace DotNetOpenAuth.Test.OpenId {
/// </summary>
/// <returns>The new instance.</returns>
protected OpenIdProvider CreateProvider() {
- var op = new OpenIdProvider(new StandardProviderApplicationStore(), this.HostFactories);
+ var op = new OpenIdProvider(new MemoryCryptoKeyAndNonceStore(), this.HostFactories);
return op;
}
}
diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs
index 2d9413d..78dd30f 100644
--- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/OpenIdRelyingPartyTests.cs
@@ -12,6 +12,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty {
using System.Web;
using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.Messaging.Bindings;
using DotNetOpenAuth.OpenId;
using DotNetOpenAuth.OpenId.Extensions;
using DotNetOpenAuth.OpenId.Messages;
@@ -40,7 +41,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty {
[Test, ExpectedException(typeof(ArgumentNullException))]
public void SecuritySettingsSetNull() {
- var rp = new OpenIdRelyingParty(new StandardRelyingPartyApplicationStore());
+ var rp = new OpenIdRelyingParty(new MemoryCryptoKeyAndNonceStore());
rp.SecuritySettings = null;
}
@@ -109,10 +110,10 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty {
/// </summary>
[Test]
public async Task AssertionWithEndpointFilter() {
- var opStore = new StandardProviderApplicationStore();
+ var opStore = new MemoryCryptoKeyAndNonceStore();
Handle(RPUri).By(
async req => {
- var rp = new OpenIdRelyingParty(new StandardRelyingPartyApplicationStore(), this.HostFactories);
+ var rp = new OpenIdRelyingParty(new MemoryCryptoKeyAndNonceStore(), this.HostFactories);
// Rig it to always deny the incoming OP
rp.EndpointFilter = op => false;