summaryrefslogtreecommitdiffstats
path: root/projecttemplates/WebFormsRelyingParty/Model.IssuedRequestToken.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-11-10 21:00:37 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-11-10 21:00:37 -0800
commit6df46c9875f82f5a5f94a082a0b699fde2978d6f (patch)
tree56df88c1a4fe02a363e5a0d7d087c1947322ab09 /projecttemplates/WebFormsRelyingParty/Model.IssuedRequestToken.cs
parent5d4d80b4a83bb9d6af62cc5f6d78f6f7e541e67d (diff)
downloadDotNetOpenAuth-6df46c9875f82f5a5f94a082a0b699fde2978d6f.zip
DotNetOpenAuth-6df46c9875f82f5a5f94a082a0b699fde2978d6f.tar.gz
DotNetOpenAuth-6df46c9875f82f5a5f94a082a0b699fde2978d6f.tar.bz2
Added a bunch more OAuth SP supporting code, but it's not done yet.
Diffstat (limited to 'projecttemplates/WebFormsRelyingParty/Model.IssuedRequestToken.cs')
-rw-r--r--projecttemplates/WebFormsRelyingParty/Model.IssuedRequestToken.cs35
1 files changed, 34 insertions, 1 deletions
diff --git a/projecttemplates/WebFormsRelyingParty/Model.IssuedRequestToken.cs b/projecttemplates/WebFormsRelyingParty/Model.IssuedRequestToken.cs
index 08378de..1352e54 100644
--- a/projecttemplates/WebFormsRelyingParty/Model.IssuedRequestToken.cs
+++ b/projecttemplates/WebFormsRelyingParty/Model.IssuedRequestToken.cs
@@ -1,4 +1,10 @@
-namespace WebFormsRelyingParty {
+//-----------------------------------------------------------------------
+// <copyright file="Model.IssuedRequestToken.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace WebFormsRelyingParty {
using System;
using System.Collections.Generic;
using System.Linq;
@@ -6,18 +12,45 @@
using DotNetOpenAuth.OAuth.ChannelElements;
public partial class IssuedRequestToken : IServiceProviderRequestToken {
+ /// <summary>
+ /// Gets or sets the callback associated specifically with this token, if any.
+ /// </summary>
+ /// <value>
+ /// The callback URI; or <c>null</c> if no callback was specifically assigned to this token.
+ /// </value>
public Uri Callback {
get { return this.CallbackAsString != null ? new Uri(this.CallbackAsString) : null; }
set { this.CallbackAsString = value != null ? value.AbsoluteUri : null; }
}
+ /// <summary>
+ /// Gets or sets the version of the Consumer that requested this token.
+ /// </summary>
+ /// <remarks>
+ /// This property is used to determine whether a <see cref="VerificationCode"/> must be
+ /// generated when the user authorizes the Consumer or not.
+ /// </remarks>
Version IServiceProviderRequestToken.ConsumerVersion {
get { return this.ConsumerVersionAsString != null ? new Version(this.ConsumerVersionAsString) : null; }
set { this.ConsumerVersionAsString = value != null ? value.ToString() : null; }
}
+ /// <summary>
+ /// Gets the consumer key that requested this token.
+ /// </summary>
string IServiceProviderRequestToken.ConsumerKey {
get { return this.Consumer.ConsumerKey; }
}
+
+ /// <summary>
+ /// Authorizes this request token to allow exchange for an access token.
+ /// </summary>
+ /// <remarks>
+ /// Call this method when the user has completed web-based authorization.
+ /// </remarks>
+ public void Authorize() {
+ this.User = Global.LoggedInUser;
+ Global.DataContext.SaveChanges();
+ }
}
}