diff options
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs')
-rw-r--r-- | src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs index 4f793a5..a4f6b21 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs @@ -53,9 +53,13 @@ namespace DotNetOpenAuth.OAuth2 { /// </summary> /// <param name="scopes">The scope of authorized access requested.</param> /// <param name="state">The state of the client that should be sent back with the authorization response.</param> + /// <param name="returnTo">The URL the authorization server should redirect the browser (typically on this site) to when the authorization is completed. If null, the current request's URL will be used.</param> /// <returns>The authorization request.</returns> - public OutgoingWebResponse PrepareRequestUserAuthorization(IEnumerable<string> scopes = null, string state = null) { - var authorizationState = new AuthorizationState(scopes); + public OutgoingWebResponse PrepareRequestUserAuthorization(IEnumerable<string> scopes = null, string state = null, Uri returnTo = null) + { + var authorizationState = new AuthorizationState(scopes) { + Callback = returnTo, + }; return this.PrepareRequestUserAuthorization(authorizationState, state); } |