summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-08-18 22:20:41 -0600
committerAndrew Arnott <andrewarnott@gmail.com>2008-08-18 22:20:41 -0600
commitaa75148d329267e1525a9568d25a0f95e411f3bb (patch)
treed4af48085901d261da870e4a1f0362c3070f5313
parent097276044aff2c9474b2aea7e602a5d4aec423bb (diff)
downloadDotNetOpenAuth-aa75148d329267e1525a9568d25a0f95e411f3bb.zip
DotNetOpenAuth-aa75148d329267e1525a9568d25a0f95e411f3bb.tar.gz
DotNetOpenAuth-aa75148d329267e1525a9568d25a0f95e411f3bb.tar.bz2
Moved IRequest.RelyingPartyVersion to IAuthenticationRequest.RelyingPartyVersion.
Fxcop fixes.
-rw-r--r--src/DotNetOpenId.Test/Provider/OpenIdProviderTest.cs3
-rw-r--r--src/DotNetOpenId.Test/RelyingParty/OpenIdRelyingPartyTest.cs2
-rw-r--r--src/DotNetOpenId/DotNetOpenId.csproj1
-rw-r--r--src/DotNetOpenId/Protocol.cs2
-rw-r--r--src/DotNetOpenId/Provider/IAuthenticationRequest.cs4
-rw-r--r--src/DotNetOpenId/Provider/IRequest.cs4
-rw-r--r--src/DotNetOpenId/RelyingParty/AuthenticationRequest.cs3
-rw-r--r--src/DotNetOpenId/RelyingParty/RelyingPartySecuritySettings.cs2
8 files changed, 10 insertions, 11 deletions
diff --git a/src/DotNetOpenId.Test/Provider/OpenIdProviderTest.cs b/src/DotNetOpenId.Test/Provider/OpenIdProviderTest.cs
index ff075c3..d0dd4ee 100644
--- a/src/DotNetOpenId.Test/Provider/OpenIdProviderTest.cs
+++ b/src/DotNetOpenId.Test/Provider/OpenIdProviderTest.cs
@@ -112,7 +112,8 @@ namespace DotNetOpenId.Test.Provider {
rp10Request[simulatedVersion.openid.Realm] = TestSupport.Realm;
OpenIdProvider op = TestSupport.CreateProvider(rp10Request);
- Assert.AreEqual(simulatedVersion.ProtocolVersion, op.Request.RelyingPartyVersion);
+ Assert.AreEqual(simulatedVersion.ProtocolVersion,
+ ((DotNetOpenId.Provider.IAuthenticationRequest)op.Request).RelyingPartyVersion);
// Verify V2.0 reporting.
var rp20Request = TestSupport.CreateRelyingPartyRequest(true, TestSupport.Scenarios.AutoApproval, ProtocolVersion.V20);
diff --git a/src/DotNetOpenId.Test/RelyingParty/OpenIdRelyingPartyTest.cs b/src/DotNetOpenId.Test/RelyingParty/OpenIdRelyingPartyTest.cs
index 5aef853..37e9ab3 100644
--- a/src/DotNetOpenId.Test/RelyingParty/OpenIdRelyingPartyTest.cs
+++ b/src/DotNetOpenId.Test/RelyingParty/OpenIdRelyingPartyTest.cs
@@ -388,7 +388,7 @@ namespace DotNetOpenId.Test.RelyingParty {
MockIdentifier id = TestSupport.GetMockIdentifier(TestSupport.Scenarios.AutoApproval, ProtocolVersion.V11);
var rp = TestSupport.CreateRelyingParty(null);
- rp.Settings.MinimumRequiredOpenIDVersion = ProtocolVersion.V20;
+ rp.Settings.MinimumRequiredOpenIdVersion = ProtocolVersion.V20;
rp.CreateRequest(id, TestSupport.Realm, TestSupport.ReturnTo);
}
}
diff --git a/src/DotNetOpenId/DotNetOpenId.csproj b/src/DotNetOpenId/DotNetOpenId.csproj
index 17ec058..79a6937 100644
--- a/src/DotNetOpenId/DotNetOpenId.csproj
+++ b/src/DotNetOpenId/DotNetOpenId.csproj
@@ -60,7 +60,6 @@
<Compile Include="AssociationMemoryStore.cs" />
<Compile Include="Associations.cs" />
<Compile Include="DiffieHellmanUtil.cs" />
- <Compile Include="InternalErrorException.cs" />
<Compile Include="Provider\ProviderSecuritySettings.cs" />
<Compile Include="RelyingParty\RelyingPartySecuritySettings.cs" />
<Compile Include="SecuritySettings.cs" />
diff --git a/src/DotNetOpenId/Protocol.cs b/src/DotNetOpenId/Protocol.cs
index bbbc57a..cf5f9c2 100644
--- a/src/DotNetOpenId/Protocol.cs
+++ b/src/DotNetOpenId/Protocol.cs
@@ -141,7 +141,7 @@ namespace DotNetOpenId {
switch (Version.Major) {
case 1: return ProtocolVersion.V11;
case 2: return ProtocolVersion.V20;
- default: throw new InternalErrorException();
+ default: throw new ArgumentException(); // this should never happen
}
}
}
diff --git a/src/DotNetOpenId/Provider/IAuthenticationRequest.cs b/src/DotNetOpenId/Provider/IAuthenticationRequest.cs
index 38f4be0..4716642 100644
--- a/src/DotNetOpenId/Provider/IAuthenticationRequest.cs
+++ b/src/DotNetOpenId/Provider/IAuthenticationRequest.cs
@@ -10,6 +10,10 @@ namespace DotNetOpenId.Provider {
/// </summary>
public interface IAuthenticationRequest : IRequest {
/// <summary>
+ /// Gets the version of OpenID being used by the relying party that sent the request.
+ /// </summary>
+ ProtocolVersion RelyingPartyVersion { get; }
+ /// <summary>
/// Whether the consumer demands an immediate response.
/// If false, the consumer is willing to wait for the identity provider
/// to authenticate the user.
diff --git a/src/DotNetOpenId/Provider/IRequest.cs b/src/DotNetOpenId/Provider/IRequest.cs
index cfa3f78..6275b23 100644
--- a/src/DotNetOpenId/Provider/IRequest.cs
+++ b/src/DotNetOpenId/Provider/IRequest.cs
@@ -14,10 +14,6 @@ namespace DotNetOpenId.Provider {
/// </remarks>
public interface IRequest {
/// <summary>
- /// Gets the version of OpenID being used by the relying party that sent the request.
- /// </summary>
- ProtocolVersion RelyingPartyVersion { get; }
- /// <summary>
/// Returns true if the Response is ready to be sent to the user agent.
/// Returns false if there are properties that must be set on this
/// request instance before the response can be sent.
diff --git a/src/DotNetOpenId/RelyingParty/AuthenticationRequest.cs b/src/DotNetOpenId/RelyingParty/AuthenticationRequest.cs
index ccb8449..0ffd8e3 100644
--- a/src/DotNetOpenId/RelyingParty/AuthenticationRequest.cs
+++ b/src/DotNetOpenId/RelyingParty/AuthenticationRequest.cs
@@ -109,11 +109,10 @@ namespace DotNetOpenId.RelyingParty {
if (relyingParty == null) throw new ArgumentNullException("relyingParty");
// Construct the endpoints filters based on criteria given by the host web site.
- EndpointSelector versionFilter = ep => ((ServiceEndpoint)ep).Protocol.Version >= Protocol.Lookup(relyingParty.Settings.MinimumRequiredOpenIDVersion).Version;
+ EndpointSelector versionFilter = ep => ((ServiceEndpoint)ep).Protocol.Version >= Protocol.Lookup(relyingParty.Settings.MinimumRequiredOpenIdVersion).Version;
EndpointSelector hostFilter = relyingParty.EndpointFilter ?? (ep => true);
var filteredEndpoints = new List<IXrdsProviderEndpoint>(endpoints.Count);
- var filter = relyingParty.EndpointFilter;
foreach (ServiceEndpoint endpoint in endpoints) {
if (versionFilter(endpoint) && hostFilter(endpoint)) {
filteredEndpoints.Add(endpoint);
diff --git a/src/DotNetOpenId/RelyingParty/RelyingPartySecuritySettings.cs b/src/DotNetOpenId/RelyingParty/RelyingPartySecuritySettings.cs
index 30ba9b1..2954473 100644
--- a/src/DotNetOpenId/RelyingParty/RelyingPartySecuritySettings.cs
+++ b/src/DotNetOpenId/RelyingParty/RelyingPartySecuritySettings.cs
@@ -59,6 +59,6 @@ namespace DotNetOpenId.RelyingParty {
/// Gets/sets the oldest version of OpenID the remote party is allowed to implement.
/// </summary>
/// <value>Defaults to <see cref="ProtocolVersion.V10"/></value>
- public ProtocolVersion MinimumRequiredOpenIDVersion { get; set; }
+ public ProtocolVersion MinimumRequiredOpenIdVersion { get; set; }
}
}