OAuthWeb RedirectToAuthorization Method (ClientName, NameValueCollection, String)Nemiro.OAuth
Redirects current client to the authorization page of the specified provider, query parameters and return URL.

Namespace: Nemiro.OAuth
Assembly: Nemiro.OAuth (in Nemiro.OAuth.dll) Version: 1.9.4.725 (1.9.4.725)
Syntax

public static void RedirectToAuthorization(
	ClientName clientName,
	NameValueCollection parameters,
	string returnUrl
)

Parameters

clientName
Type: Nemiro.OAuth ClientName
Provider name, through which it is necessary to authorize the current user.
parameters
Type: System.Collections.Specialized NameValueCollection
Additional parameters to be passed to the authorization query.
returnUrl
Type: System String
The address to which the user is redirected after the authorization.
Exceptions

ExceptionCondition
ClientIsNotRegisteredExceptionclientName is unregistered. Use the RegisterClient(OAuthBase) for OAuth clients registration.
NullHttpContextException The exception that is thrown when you try to access methods that are designed for web projects.
Remarks

The method will not work in desktop applications. For desktop applications you can use GetAuthorizationUrl(String, NameValueCollection, String).

See Also