diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-08-12 06:49:28 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-08-12 06:49:28 -0700 |
commit | ccc415b8104c66d3d422c1cffd04a4b1b26dfa0c (patch) | |
tree | 574b1ee183711bfa03fe9411257fcee85fcbfbb1 | |
parent | 93199748de57054f40085e95db5d586e9728abb7 (diff) | |
download | DotNetOpenAuth-ccc415b8104c66d3d422c1cffd04a4b1b26dfa0c.zip DotNetOpenAuth-ccc415b8104c66d3d422c1cffd04a4b1b26dfa0c.tar.gz DotNetOpenAuth-ccc415b8104c66d3d422c1cffd04a4b1b26dfa0c.tar.bz2 |
Added an easier method to call with a custom callback URL for an OAuth client.
-rw-r--r-- | src/DotNetOpenAuth/OAuth2/WebServerClient.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth/OAuth2/WebServerClient.cs b/src/DotNetOpenAuth/OAuth2/WebServerClient.cs index d50ab8f..ca4e1a9 100644 --- a/src/DotNetOpenAuth/OAuth2/WebServerClient.cs +++ b/src/DotNetOpenAuth/OAuth2/WebServerClient.cs @@ -40,8 +40,12 @@ namespace DotNetOpenAuth.OAuth2 { /// </summary> /// <param name="scope">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> - public void RequestUserAuthorization(IEnumerable<string> scope = null, string state = null) { - this.PrepareRequestUserAuthorization(scope, state).Send(); + /// <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> + public void RequestUserAuthorization(IEnumerable<string> scope = null, string state = null, Uri returnTo = null) { + var authorizationState = new AuthorizationState(scope) { + Callback = returnTo, + }; + this.PrepareRequestUserAuthorization(authorizationState, state).Send(); } /// <summary> |