diff options
author | Rafal Legiedz <rafal.legiedz@gmail.com> | 2012-02-04 05:12:11 +0100 |
---|---|---|
committer | Rafal Legiedz <rafal.legiedz@gmail.com> | 2012-02-04 05:12:11 +0100 |
commit | f48eb4274316121a7f640a41b2a5eb50b2f56874 (patch) | |
tree | 452e3abfd6126ebb39576c1ae6f73eb07b6b9ecc /src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs | |
parent | 492f4566b70142e5fc41a9c3fb4564c64c66ac5f (diff) | |
download | DotNetOpenAuth-f48eb4274316121a7f640a41b2a5eb50b2f56874.zip DotNetOpenAuth-f48eb4274316121a7f640a41b2a5eb50b2f56874.tar.gz DotNetOpenAuth-f48eb4274316121a7f640a41b2a5eb50b2f56874.tar.bz2 |
Added returnTo parameter to PrepareRequestUserAuthorization in OAuth2/WebServerClient.cs
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); } |