summaryrefslogtreecommitdiffstats
path: root/projecttemplates/WebFormsRelyingParty/Code/OAuthTokenManager.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-11-10 21:17:28 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-11-10 21:17:28 -0800
commit175bd8ea3e95649b4be51dce17ae175db3400c3c (patch)
tree22f8ea3120e80d47afbbe0c3f6e82a6b3712e3ef /projecttemplates/WebFormsRelyingParty/Code/OAuthTokenManager.cs
parent5ac3804dcd815e6b2aeba79c7faecdcd3649d73d (diff)
downloadDotNetOpenAuth-175bd8ea3e95649b4be51dce17ae175db3400c3c.zip
DotNetOpenAuth-175bd8ea3e95649b4be51dce17ae175db3400c3c.tar.gz
DotNetOpenAuth-175bd8ea3e95649b4be51dce17ae175db3400c3c.tar.bz2
Added scope to issued OAuth tokens.
Diffstat (limited to 'projecttemplates/WebFormsRelyingParty/Code/OAuthTokenManager.cs')
-rw-r--r--projecttemplates/WebFormsRelyingParty/Code/OAuthTokenManager.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/projecttemplates/WebFormsRelyingParty/Code/OAuthTokenManager.cs b/projecttemplates/WebFormsRelyingParty/Code/OAuthTokenManager.cs
index d9c04bd..79a0b7e 100644
--- a/projecttemplates/WebFormsRelyingParty/Code/OAuthTokenManager.cs
+++ b/projecttemplates/WebFormsRelyingParty/Code/OAuthTokenManager.cs
@@ -71,6 +71,10 @@ namespace WebFormsRelyingParty.Code {
Token = response.Token,
TokenSecret = response.TokenSecret,
};
+ string scope;
+ if (request.ExtraData.TryGetValue("scope", out scope)) {
+ token.Scope = scope;
+ }
Global.DataContext.AddToIssuedToken(token);
Global.DataContext.SaveChanges();
}
@@ -108,6 +112,7 @@ namespace WebFormsRelyingParty.Code {
ExpirationDate = null, // currently, our access tokens don't expire
CreatedOn = DateTime.Now,
User = requestTokenEntity.User,
+ Scope = requestTokenEntity.Scope,
};
Global.DataContext.DeleteObject(requestTokenEntity);