summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Protocol.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-11-03 16:02:57 -0800
committerAndrew <andrewarnott@gmail.com>2008-11-03 16:02:57 -0800
commitaa1f55f58a561ff64dc268977d0d7c9decb92bbe (patch)
treefd685f00353d26493b40df7eaeac78745e27d1b8 /src/DotNetOAuth/Protocol.cs
parentf1794fc8779ae39ac3d5bc6e8b811523e62ca482 (diff)
downloadDotNetOpenAuth-aa1f55f58a561ff64dc268977d0d7c9decb92bbe.zip
DotNetOpenAuth-aa1f55f58a561ff64dc268977d0d7c9decb92bbe.tar.gz
DotNetOpenAuth-aa1f55f58a561ff64dc268977d0d7c9decb92bbe.tar.bz2
Moved all the OAuth classes into its own namespace in preparation to receiving DotNetOpenId merge.
Diffstat (limited to 'src/DotNetOAuth/Protocol.cs')
-rw-r--r--src/DotNetOAuth/Protocol.cs87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/DotNetOAuth/Protocol.cs b/src/DotNetOAuth/Protocol.cs
deleted file mode 100644
index 7d91b6c..0000000
--- a/src/DotNetOAuth/Protocol.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-//-----------------------------------------------------------------------
-// <copyright file="Protocol.cs" company="Andrew Arnott">
-// Copyright (c) Andrew Arnott. All rights reserved.
-// </copyright>
-//-----------------------------------------------------------------------
-
-namespace DotNetOAuth {
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using DotNetOAuth.Messaging;
-
- /// <summary>
- /// Constants used in the OAuth protocol.
- /// </summary>
- /// <remarks>
- /// OAuth Protocol Parameter names and values are case sensitive. Each OAuth Protocol Parameters MUST NOT appear more than once per request, and are REQUIRED unless otherwise noted,
- /// per OAuth 1.0 section 5.
- /// </remarks>
- internal class Protocol {
- /// <summary>
- /// The namespace to use for V1.0 of the protocol.
- /// </summary>
- internal const string DataContractNamespaceV10 = "http://oauth.net/core/1.0/";
-
- /// <summary>
- /// Gets the <see cref="Protocol"/> instance with values initialized for V1.0 of the protocol.
- /// </summary>
- internal static readonly Protocol V10 = new Protocol {
- dataContractNamespace = DataContractNamespaceV10,
- };
-
- /// <summary>
- /// The namespace to use for this version of the protocol.
- /// </summary>
- private string dataContractNamespace;
-
- /// <summary>
- /// The prefix used for all key names in the protocol.
- /// </summary>
- private string parameterPrefix = "oauth_";
-
- /// <summary>
- /// The scheme to use in Authorization header message requests.
- /// </summary>
- private string authorizationHeaderScheme = "OAuth";
-
- /// <summary>
- /// Gets the default <see cref="Protocol"/> instance.
- /// </summary>
- internal static Protocol Default { get { return V10; } }
-
- /// <summary>
- /// Gets the namespace to use for this version of the protocol.
- /// </summary>
- internal string DataContractNamespace {
- get { return this.dataContractNamespace; }
- }
-
- /// <summary>
- /// Gets the prefix used for all key names in the protocol.
- /// </summary>
- internal string ParameterPrefix {
- get { return this.parameterPrefix; }
- }
-
- /// <summary>
- /// Gets the scheme to use in Authorization header message requests.
- /// </summary>
- internal string AuthorizationHeaderScheme {
- get { return this.authorizationHeaderScheme; }
- }
-
- /// <summary>
- /// Gets an instance of <see cref="Protocol"/> given a <see cref="Version"/>.
- /// </summary>
- /// <param name="version">The version of the protocol that is desired.</param>
- /// <returns>The <see cref="Protocol"/> instance representing the requested version.</returns>
- internal static Protocol Lookup(Version version) {
- switch (version.Major) {
- case 1: return Protocol.V10;
- default: throw new ArgumentOutOfRangeException("version");
- }
- }
- }
-}