summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-09-01 17:34:59 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-09-01 17:34:59 -0700
commit6e8a6eb02294c28b13bacaa339e58a67fd766f99 (patch)
treea1bd58a2a51505ba71b697fb61378e7142df8ef3 /src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs
parente36299f39476c56977c39700067ed8f6ae0a4e49 (diff)
parent36b1ba3c75d060fa71f6f15582b90e7f70292ddc (diff)
downloadDotNetOpenAuth-6e8a6eb02294c28b13bacaa339e58a67fd766f99.zip
DotNetOpenAuth-6e8a6eb02294c28b13bacaa339e58a67fd766f99.tar.gz
DotNetOpenAuth-6e8a6eb02294c28b13bacaa339e58a67fd766f99.tar.bz2
Merge branch 'master' into contracts
Conflicts: src/DotNetOpenAuth.Test/Mocks/MockIdentifier.cs src/DotNetOpenAuth.Test/OpenId/Provider/OpenIdProviderTests.cs src/DotNetOpenAuth.vsmdi src/DotNetOpenAuth/DotNetOpenAuth.csproj src/DotNetOpenAuth/Messaging/MessageReceivingEndpoint.cs src/DotNetOpenAuth/OAuth/ChannelElements/OAuthServiceProviderMessageFactory.cs src/DotNetOpenAuth/OAuth/Protocol.cs src/DotNetOpenAuth/OAuth/ServiceProvider.cs src/DotNetOpenAuth/OpenId/Association.cs src/DotNetOpenAuth/OpenId/Behaviors/PpidGeneration.cs src/DotNetOpenAuth/OpenId/NoDiscoveryIdentifier.cs src/DotNetOpenAuth/OpenId/Provider/HostProcessedRequest.cs src/DotNetOpenAuth/OpenId/Provider/IDirectedIdentityIdentifierProvider.cs src/DotNetOpenAuth/OpenId/Provider/PrivatePersonalIdentifierProviderBase.cs src/DotNetOpenAuth/OpenId/Realm.cs src/DotNetOpenAuth/OpenId/RelyingParty/AuthenticationRequest.cs src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdAjaxTextBox.cs src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdRelyingPartyAjaxControlBase.cs src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs src/DotNetOpenAuth/OpenId/RelyingParty/PositiveAuthenticationResponseSnapshot.cs src/DotNetOpenAuth/OpenId/UriIdentifier.cs src/DotNetOpenAuth/OpenId/XriIdentifier.cs src/DotNetOpenAuth/Util.cs
Diffstat (limited to 'src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs')
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs
index 7701090..701bcae 100644
--- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/PositiveAuthenticationResponseTests.cs
@@ -38,7 +38,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty {
Assert.AreEqual(AuthenticationStatus.Authenticated, authResponse.Status);
Assert.IsNull(authResponse.Exception);
Assert.AreEqual<string>(assertion.ClaimedIdentifier, authResponse.ClaimedIdentifier);
- Assert.AreEqual<string>(authResponseAccessor.endpoint.FriendlyIdentifierForDisplay, authResponse.FriendlyIdentifierForDisplay);
+ Assert.AreEqual<string>(authResponse.Endpoint.FriendlyIdentifierForDisplay, authResponse.FriendlyIdentifierForDisplay);
Assert.AreSame(extension, authResponse.GetUntrustedExtension(typeof(ClaimsResponse)));
Assert.AreSame(extension, authResponse.GetUntrustedExtension<ClaimsResponse>());
Assert.IsNull(authResponse.GetCallbackArgument("a"));
@@ -59,6 +59,18 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty {
Assert.AreEqual(AuthenticationStatus.Failed, authResponse.Status);
}
+ /// <summary>
+ /// Verifies that the RP rejects positive assertions with HTTP Claimed
+ /// Cdentifiers when RequireSsl is set to true.
+ /// </summary>
+ [TestMethod, ExpectedException(typeof(ProtocolException))]
+ public void InsecureIdentifiersRejectedWithRequireSsl() {
+ PositiveAssertionResponse assertion = this.GetPositiveAssertion();
+ var rp = CreateRelyingParty();
+ rp.SecuritySettings.RequireSsl = true;
+ var authResponse = new PositiveAuthenticationResponse(assertion, rp);
+ }
+
[TestMethod]
public void GetCallbackArguments() {
PositiveAssertionResponse assertion = this.GetPositiveAssertion();