/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }