diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-03 08:41:16 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-03 08:41:16 -0800 |
commit | 475b47ab8eaa23e064763b05539fa750accebfdc (patch) | |
tree | 785a8c82ec1d8884fc51c201c23040923cbfa6fc /src/DotNetOpenAuth.OAuth2.Client.UI/OAuth2/ClientAuthorizationView.cs | |
parent | 74b6b4efd2be2680e3067f716829b0c9385ceebe (diff) | |
parent | 1fdcca1a8019189237e86907f220307e2ccd61c9 (diff) | |
download | DotNetOpenAuth-475b47ab8eaa23e064763b05539fa750accebfdc.zip DotNetOpenAuth-475b47ab8eaa23e064763b05539fa750accebfdc.tar.gz DotNetOpenAuth-475b47ab8eaa23e064763b05539fa750accebfdc.tar.bz2 |
Merge branch 'OAuthSimple' into httpclient
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.Client.UI/OAuth2/ClientAuthorizationView.cs')
-rw-r--r-- | src/DotNetOpenAuth.OAuth2.Client.UI/OAuth2/ClientAuthorizationView.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client.UI/OAuth2/ClientAuthorizationView.cs b/src/DotNetOpenAuth.OAuth2.Client.UI/OAuth2/ClientAuthorizationView.cs index 002202e..8f1c5f6 100644 --- a/src/DotNetOpenAuth.OAuth2.Client.UI/OAuth2/ClientAuthorizationView.cs +++ b/src/DotNetOpenAuth.OAuth2.Client.UI/OAuth2/ClientAuthorizationView.cs @@ -95,6 +95,14 @@ namespace DotNetOpenAuth.OAuth2 { } /// <summary> + /// Gets or sets a value indicating whether the implicit grant type should be used instead of the authorization code grant. + /// </summary> + /// <value> + /// <c>true</c> if [request implicit grant]; otherwise, <c>false</c>. + /// </value> + public bool RequestImplicitGrant { get; set; } + + /// <summary> /// Called when the authorization flow has been completed. /// </summary> protected virtual void OnCompleted() { @@ -113,7 +121,7 @@ namespace DotNetOpenAuth.OAuth2 { protected override async void OnLoad(EventArgs e) { base.OnLoad(e); - Uri authorizationUrl = await this.Client.RequestUserAuthorizationAsync(this.Authorization); + Uri authorizationUrl = await this.Client.RequestUserAuthorizationAsync(this.Authorization, implicitResponseType: this.RequestImplicitGrant); this.webBrowser1.Navigate(authorizationUrl.AbsoluteUri); // use AbsoluteUri to workaround bug in WebBrowser that calls Uri.ToString instead of Uri.AbsoluteUri leading to escaping errors. } |