//----------------------------------------------------------------------- // // Copyright (c) Andrew Arnott. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOAuth { using System; using System.Collections.Generic; using System.Linq; using System.Text; using DotNetOAuth.Messaging; /// /// Constants used in the OAuth protocol. /// /// /// 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. /// internal class Protocol { /// /// Gets the default instance. /// internal static Protocol Default { get { return V10; } } /// /// The namespace to use for V1.0 of the protocol. /// internal const string DataContractNamespaceV10 = "http://oauth.net/core/1.0/"; /// /// Gets the instance with values initialized for V1.0 of the protocol. /// internal static readonly Protocol V10 = new Protocol { dataContractNamespace = DataContractNamespaceV10, }; /// /// The namespace to use for this version of the protocol. /// private string dataContractNamespace; /// /// The prefix used for all key names in the protocol. /// private string parameterPrefix = "oauth_"; /// /// The scheme to use in Authorization header message requests. /// private string authorizationHeaderScheme = "OAuth"; /// /// Gets the namespace to use for this version of the protocol. /// internal string DataContractNamespace { get { return this.dataContractNamespace; } } /// /// Gets the prefix used for all key names in the protocol. /// internal string ParameterPrefix { get { return this.parameterPrefix; } } /// /// Gets the scheme to use in Authorization header message requests. /// internal string AuthorizationHeaderScheme { get { return this.authorizationHeaderScheme; } } } }