示例#1
0
 /// <summary>
 /// Returns the authorization URL of the specified provider, query parameters and return URL.
 /// </summary>
 /// <param name="clientName">
 /// The provider name, through which it is necessary to authorize the current user; or the name of the registered client.
 /// </param>
 /// <param name="parameters">Additional parameters to be passed to the authorization URL.</param>
 /// <param name="returnUrl">The address to which the user is redirected after the authorization.</param>
 /// <exception cref="NullHttpContextException">
 /// The exception that is thrown when you try to access methods that are designed for web projects.
 /// </exception>
 public static string GetAuthorizationUrl(ClientName clientName, NameValueCollection parameters, string returnUrl)
 {
     return(OAuthWeb.GetAuthorizationUrl(clientName, parameters, returnUrl, null));
 }
示例#2
0
 /// <summary>
 /// Returns the authorization URL of the specified provider and return URL.
 /// </summary>
 /// <param name="clientName">Provider name, through which it is necessary to authorize the current user.</param>
 /// <param name="returnUrl">The address to which the user is redirected after the authorization.</param>
 /// <param name="state">Custom state associated with authorization request.</param>
 /// <exception cref="NullHttpContextException">
 /// The exception that is thrown when you try to access methods that are designed for web projects.
 /// </exception>
 public static string GetAuthorizationUrl(string clientName, string returnUrl, object state)
 {
     return(OAuthWeb.GetAuthorizationUrl(ClientName.Parse(clientName), null, returnUrl, state));
 }
示例#3
0
 /// <summary>
 /// Returns the authorization URL of the specified provider with specified parameters.
 /// </summary>
 /// <param name="clientName">Provider name, through which it is necessary to authorize the current user.</param>
 /// <param name="parameters">Additional parameters to be passed to the authorization URL.</param>
 /// <exception cref="NullHttpContextException">
 /// The exception that is thrown when you try to access methods that are designed for web projects.
 /// </exception>
 public static string GetAuthorizationUrl(string clientName, NameValueCollection parameters)
 {
     return(OAuthWeb.GetAuthorizationUrl(ClientName.Parse(clientName), parameters, null, null));
 }
示例#4
0
 /// <summary>
 /// Returns the authorization URL of the specified provider.
 /// </summary>
 /// <param name="clientName">Provider name, through which it is necessary to authorize the current user.</param>
 /// <exception cref="NullHttpContextException">
 /// The exception that is thrown when you try to access methods that are designed for web projects.
 /// </exception>
 public static string GetAuthorizationUrl(string clientName)
 {
     return(OAuthWeb.GetAuthorizationUrl(ClientName.Parse(clientName), null, null, null));
 }
示例#5
0
 /// <summary>
 /// Returns the authorization URL of the specified provider and return URL.
 /// </summary>
 /// <param name="providerName">Provider name, through which it is necessary to authorize the current user.</param>
 /// <param name="returnUrl">The address to which the user is redirected after the authorization.</param>
 /// <exception cref="NullHttpContextException">
 /// The exception that is thrown when you try to access methods that are designed for web projects.
 /// </exception>
 public static string GetAuthorizationUrl(string providerName, string returnUrl)
 {
     return(OAuthWeb.GetAuthorizationUrl(providerName, null, returnUrl));
 }
示例#6
0
 /// <summary>
 /// Returns the authorization URL of the specified provider with specified parameters.
 /// </summary>
 /// <param name="providerName">Provider name, through which it is necessary to authorize the current user.</param>
 /// <param name="parameters">Additional parameters to be passed to the authorization URL.</param>
 /// <exception cref="NullHttpContextException">
 /// The exception that is thrown when you try to access methods that are designed for web projects.
 /// </exception>
 public static string GetAuthorizationUrl(string providerName, NameValueCollection parameters)
 {
     return(OAuthWeb.GetAuthorizationUrl(providerName, parameters, null));
 }