diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-19 07:54:10 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-19 07:54:10 -0700 |
commit | b5c8335f528acbca046ca2844f8e4c12cfa9cba3 (patch) | |
tree | dc1f86b45964c2e4d92a5e61fe0efd317158faf4 /projecttemplates/WebFormsRelyingParty/Members/OAuthAuthorize.aspx.cs | |
parent | c34d74ed81bcac18961272d52dc5bab21a3394fa (diff) | |
download | DotNetOpenAuth-b5c8335f528acbca046ca2844f8e4c12cfa9cba3.zip DotNetOpenAuth-b5c8335f528acbca046ca2844f8e4c12cfa9cba3.tar.gz DotNetOpenAuth-b5c8335f528acbca046ca2844f8e4c12cfa9cba3.tar.bz2 |
Changed the public API for OAuth 2.0 scope from a space-delimited string to a HashSet<string>
Diffstat (limited to 'projecttemplates/WebFormsRelyingParty/Members/OAuthAuthorize.aspx.cs')
-rw-r--r-- | projecttemplates/WebFormsRelyingParty/Members/OAuthAuthorize.aspx.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/projecttemplates/WebFormsRelyingParty/Members/OAuthAuthorize.aspx.cs b/projecttemplates/WebFormsRelyingParty/Members/OAuthAuthorize.aspx.cs index 2a95b89..05a5f52 100644 --- a/projecttemplates/WebFormsRelyingParty/Members/OAuthAuthorize.aspx.cs +++ b/projecttemplates/WebFormsRelyingParty/Members/OAuthAuthorize.aspx.cs @@ -16,6 +16,7 @@ namespace WebFormsRelyingParty.Members { using DotNetOpenAuth.Messaging; using DotNetOpenAuth.OAuth; using DotNetOpenAuth.OAuth.Messages; + using DotNetOpenAuth.OAuth2; using DotNetOpenAuth.OAuth2.Messages; using RelyingPartyLogic; @@ -37,7 +38,7 @@ namespace WebFormsRelyingParty.Members { this.csrfCheck.Value = Code.SiteUtilities.SetCsrfCookie(); var requestingClient = Database.DataContext.Clients.First(c => c.ClientIdentifier == this.pendingRequest.ClientIdentifier); this.consumerNameLabel.Text = HttpUtility.HtmlEncode(requestingClient.Name); - this.scopeLabel.Text = HttpUtility.HtmlEncode(this.pendingRequest.Scope); + this.scopeLabel.Text = HttpUtility.HtmlEncode(OAuthUtilities.JoinScopes(this.pendingRequest.Scope)); // Consider auto-approving if safe to do so. if (((OAuthAuthorizationServer)OAuthServiceProvider.AuthorizationServer.AuthorizationServer).CanBeAutoApproved(this.pendingRequest)) { @@ -53,7 +54,7 @@ namespace WebFormsRelyingParty.Members { Database.LoggedInUser.ClientAuthorizations.Add( new ClientAuthorization { Client = requestingClient, - Scope = this.pendingRequest.Scope, + Scope = OAuthUtilities.JoinScopes(this.pendingRequest.Scope), User = Database.LoggedInUser, CreatedOnUtc = DateTime.UtcNow.CutToSecond(), }); |