示例#1
0
 public OAuth1Template(string consumerKey, string consumerSecret, string requestTokenUrl, string authorizeUrl, string authenticateUrl, string accessTokenUrl, OAuth1Version version)
 {
     ArgumentUtils.AssertNotNull(consumerKey, "consumerKey");
     ArgumentUtils.AssertNotNull(consumerSecret, "consumerSecret");
     ArgumentUtils.AssertNotNull(requestTokenUrl, "requestTokenUrl");
     ArgumentUtils.AssertNotNull(authorizeUrl, "authorizeUrl");
     ArgumentUtils.AssertNotNull(accessTokenUrl, "accessTokenUrl");
     this.consumerKey = consumerKey;
     this.consumerSecret = consumerSecret;
     this.requestTokenUrl = new Uri(requestTokenUrl);
     this.authorizeUrl = authorizeUrl;
     this.authenticateUrl = authenticateUrl;
     this.accessTokenUrl = new Uri(accessTokenUrl);
     this.version = version;
     this.restTemplate = this.CreateRestTemplate();
     this.signingSupport = new SigningSupport();
 }
示例#2
0
        /// <summary>
        /// Creates an OAuth1Template.
        /// </summary>
        /// <param name="consumerKey">The application's consumer key.</param>
        /// <param name="consumerSecret">The application's consumer secret.</param>
        /// <param name="requestTokenUrl">The request token URL.</param>
        /// <param name="authorizeUrl">The authorize URL.</param>
        /// <param name="authenticateUrl">The authenticate URL.</param>
        /// <param name="accessTokenUrl">The access token URL.</param>
        /// <param name="version">The version of OAuth 1, either 10 or 10a.</param>
        public OAuth1Template(string consumerKey, string consumerSecret, string requestTokenUrl, string authorizeUrl, string authenticateUrl, string accessTokenUrl, OAuth1Version version)
        {
            ArgumentUtils.AssertNotNull(consumerKey, "consumerKey");
            ArgumentUtils.AssertNotNull(consumerSecret, "consumerSecret");
            ArgumentUtils.AssertNotNull(requestTokenUrl, "requestTokenUrl");
            ArgumentUtils.AssertNotNull(authorizeUrl, "authorizeUrl");
            ArgumentUtils.AssertNotNull(accessTokenUrl, "accessTokenUrl");

            this.consumerKey     = consumerKey;
            this.consumerSecret  = consumerSecret;
            this.requestTokenUrl = new Uri(requestTokenUrl);
            this.authorizeUrl    = authorizeUrl;
            this.authenticateUrl = authenticateUrl;
            this.accessTokenUrl  = new Uri(accessTokenUrl);
            this.version         = version;
            this.restTemplate    = this.CreateRestTemplate();
            this.signingSupport  = new SigningSupport();
        }
 /// <summary>
 /// Creates an OAuth1Template.
 /// </summary>
 /// <param name="consumerKey">The application's consumer key.</param>
 /// <param name="consumerSecret">The application's consumer secret.</param>
 /// <param name="requestTokenUrl">The request token URL.</param>
 /// <param name="authorizeUrl">The authorize URL.</param>
 /// <param name="accessTokenUrl">The access token URL.</param>
 /// <param name="version">The version of OAuth 1, either 10 or 10a.</param>
 public OAuth1Template(string consumerKey, string consumerSecret, string requestTokenUrl, string authorizeUrl, string accessTokenUrl, OAuth1Version version)
     : this(consumerKey, consumerSecret, requestTokenUrl, authorizeUrl, null, accessTokenUrl, version)
 {
 }
 public CustomOAuth1Template(string consumerKey, string consumerSecret, string requestTokenUrl, string authorizeUrl, string authenticateUrl, string accessTokenUrl, OAuth1Version version)
     : base(consumerKey, consumerSecret, requestTokenUrl, authorizeUrl, authenticateUrl, accessTokenUrl, version)
 {
 }
 public CustomOAuth1Template(string consumerKey, string consumerSecret, string requestTokenUrl, string authorizeUrl, string authenticateUrl, string accessTokenUrl, OAuth1Version version)
     : base(consumerKey, consumerSecret, requestTokenUrl, authorizeUrl, authenticateUrl, accessTokenUrl, version)
 {
 }
示例#6
0
 /// <summary>
 /// Creates an OAuth1Template.
 /// </summary>
 /// <param name="consumerKey">The application's consumer key.</param>
 /// <param name="consumerSecret">The application's consumer secret.</param>
 /// <param name="requestTokenUrl">The request token URL.</param>
 /// <param name="authorizeUrl">The authorize URL.</param>
 /// <param name="accessTokenUrl">The access token URL.</param>
 /// <param name="version">The version of OAuth 1, either 10 or 10a.</param>
 public OAuth1Template(string consumerKey, string consumerSecret, string requestTokenUrl, string authorizeUrl, string accessTokenUrl, OAuth1Version version)
     : this(consumerKey, consumerSecret, requestTokenUrl, authorizeUrl, null, accessTokenUrl, version)
 {
 }