summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-05-07 21:24:56 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-05-08 09:13:30 -0700
commit0cacaaa25581b2027c43d3dbdfa99a025b8b2fdd (patch)
tree83350c56c2d0b36dbeeecf81bb57c2678a919aef /src
parent6b3eae2e62a4d20392bae63ccfa0d6dba1cb9ab7 (diff)
downloadDotNetOpenAuth-0cacaaa25581b2027c43d3dbdfa99a025b8b2fdd.zip
DotNetOpenAuth-0cacaaa25581b2027c43d3dbdfa99a025b8b2fdd.tar.gz
DotNetOpenAuth-0cacaaa25581b2027c43d3dbdfa99a025b8b2fdd.tar.bz2
Moved "dnoa." prefix into a centralized constant.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/OpenId/ChannelElements/BackwardCompatibilityBindingElement.cs4
-rw-r--r--src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToNonceBindingElement.cs2
-rw-r--r--src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs4
-rw-r--r--src/DotNetOpenAuth/OpenId/OpenIdUtilities.cs5
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/AuthenticationRequest.cs2
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdRelyingParty.cs2
6 files changed, 12 insertions, 7 deletions
diff --git a/src/DotNetOpenAuth/OpenId/ChannelElements/BackwardCompatibilityBindingElement.cs b/src/DotNetOpenAuth/OpenId/ChannelElements/BackwardCompatibilityBindingElement.cs
index d42cc03..de9cda9 100644
--- a/src/DotNetOpenAuth/OpenId/ChannelElements/BackwardCompatibilityBindingElement.cs
+++ b/src/DotNetOpenAuth/OpenId/ChannelElements/BackwardCompatibilityBindingElement.cs
@@ -20,13 +20,13 @@ namespace DotNetOpenAuth.OpenId.ChannelElements {
/// The name of the callback parameter that stores the Provider Endpoint URL
/// to tack onto the return_to URI.
/// </summary>
- private const string ProviderEndpointParameterName = "dnoa.op_endpoint";
+ private const string ProviderEndpointParameterName = OpenIdUtilities.CustomParameterPrefix + "op_endpoint";
/// <summary>
/// The name of the callback parameter that stores the Claimed Identifier
/// to tack onto the return_to URI.
/// </summary>
- private const string ClaimedIdentifierParameterName = "dnoa.claimed_id";
+ private const string ClaimedIdentifierParameterName = OpenIdUtilities.CustomParameterPrefix + "claimed_id";
#region IChannelBindingElement Members
diff --git a/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToNonceBindingElement.cs b/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToNonceBindingElement.cs
index 6643951..7ffeabc 100644
--- a/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToNonceBindingElement.cs
+++ b/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToNonceBindingElement.cs
@@ -44,7 +44,7 @@ namespace DotNetOpenAuth.OpenId.ChannelElements {
/// The parameter of the callback parameter we tack onto the return_to URL
/// to store the replay-detection nonce.
/// </summary>
- internal const string NonceParameter = "dnoa.request_nonce";
+ internal const string NonceParameter = OpenIdUtilities.CustomParameterPrefix + "request_nonce";
/// <summary>
/// The length of the generated nonce's random part.
diff --git a/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs b/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs
index e2208ba..70e2194 100644
--- a/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs
+++ b/src/DotNetOpenAuth/OpenId/ChannelElements/ReturnToSignatureBindingElement.cs
@@ -33,13 +33,13 @@ namespace DotNetOpenAuth.OpenId.ChannelElements {
/// The name of the callback parameter we'll tack onto the return_to value
/// to store our signature on the return_to parameter.
/// </summary>
- private const string ReturnToSignatureParameterName = "dnoa.return_to_sig";
+ private const string ReturnToSignatureParameterName = OpenIdUtilities.CustomParameterPrefix + "return_to_sig";
/// <summary>
/// The name of the callback parameter we'll tack onto the return_to value
/// to store the handle of the association we use to sign the return_to parameter.
/// </summary>
- private const string ReturnToSignatureHandleParameterName = "dnoa.return_to_sig_handle";
+ private const string ReturnToSignatureHandleParameterName = OpenIdUtilities.CustomParameterPrefix + "return_to_sig_handle";
/// <summary>
/// The hashing algorithm used to generate the private signature on the return_to parameter.
diff --git a/src/DotNetOpenAuth/OpenId/OpenIdUtilities.cs b/src/DotNetOpenAuth/OpenId/OpenIdUtilities.cs
index f09bbe1..3cee968 100644
--- a/src/DotNetOpenAuth/OpenId/OpenIdUtilities.cs
+++ b/src/DotNetOpenAuth/OpenId/OpenIdUtilities.cs
@@ -24,6 +24,11 @@ namespace DotNetOpenAuth.OpenId {
/// </summary>
internal static class OpenIdUtilities {
/// <summary>
+ /// The prefix to designate this library's proprietary parameters added to the protocol.
+ /// </summary>
+ internal const string CustomParameterPrefix = "dnoa.";
+
+ /// <summary>
/// Gets the OpenID protocol instance for the version in a message.
/// </summary>
/// <param name="message">The message.</param>
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/AuthenticationRequest.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/AuthenticationRequest.cs
index 4a3c74f..b1b2a48 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/AuthenticationRequest.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/AuthenticationRequest.cs
@@ -24,7 +24,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
/// <summary>
/// The name of the internal callback parameter to use to store the user-supplied identifier.
/// </summary>
- internal const string UserSuppliedIdentifierParameterName = "dnoa.userSuppliedIdentifier";
+ internal const string UserSuppliedIdentifierParameterName = OpenIdUtilities.CustomParameterPrefix + "userSuppliedIdentifier";
/// <summary>
/// The relying party that created this request object.
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdRelyingParty.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdRelyingParty.cs
index 7039de6..7b9452e 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdRelyingParty.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdRelyingParty.cs
@@ -379,7 +379,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
internal static bool IsOpenIdSupportingParameter(string parameterName) {
Protocol protocol = Protocol.Default;
return parameterName.StartsWith(protocol.openid.Prefix, StringComparison.OrdinalIgnoreCase)
- || parameterName.StartsWith("dnoa.", StringComparison.Ordinal);
+ || parameterName.StartsWith(OpenIdUtilities.CustomParameterPrefix, StringComparison.Ordinal);
}
/// <summary>