diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-07 10:50:38 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-08 01:08:55 -0800 |
commit | 7d460c9b12b06106d6be31edfd6b49329501f730 (patch) | |
tree | 406de1c1f6fb21f2e089572d220b776a830a125c /src/DotNetOpenAuth.Test | |
parent | 5bec12cbcb9ceb80b3812b590e136b7ffa2ea1cb (diff) | |
download | DotNetOpenAuth-7d460c9b12b06106d6be31edfd6b49329501f730.zip DotNetOpenAuth-7d460c9b12b06106d6be31edfd6b49329501f730.tar.gz DotNetOpenAuth-7d460c9b12b06106d6be31edfd6b49329501f730.tar.bz2 |
Fixed a couple of test framework bugs for stateless OpenID mode.
Diffstat (limited to 'src/DotNetOpenAuth.Test')
-rw-r--r-- | src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs index 85f839f..2a08a96 100644 --- a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs @@ -135,7 +135,7 @@ namespace DotNetOpenAuth.Test.OpenId { } op.Channel.Send(response); - if (positive && !sharedAssociation) { + if (positive && (statelessRP || !sharedAssociation)) { var checkauthRequest = op.Channel.ReadFromRequest<CheckAuthenticationRequest>(); var checkauthResponse = new CheckAuthenticationResponse(checkauthRequest.Version, checkauthRequest); checkauthResponse.IsValid = checkauthRequest.IsValid; diff --git a/src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs b/src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs index 58eb4f4..dddae27 100644 --- a/src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs +++ b/src/DotNetOpenAuth.Test/OpenId/OpenIdTestBase.cs @@ -81,7 +81,11 @@ namespace DotNetOpenAuth.Test.OpenId { /// <param name="association">The association.</param> internal static void StoreAssociation(OpenIdRelyingParty relyingParty, Uri providerEndpoint, Association association) { var associationManagerAccessor = AssociationManager_Accessor.AttachShadow(relyingParty.AssociationManager); - associationManagerAccessor.associationStore.StoreAssociation(providerEndpoint, association); + + // Only store the association if the RP is not in stateless mode. + if (associationManagerAccessor.associationStore != null) { + associationManagerAccessor.associationStore.StoreAssociation(providerEndpoint, association); + } } /// <summary> |