summaryrefslogtreecommitdiffstats
path: root/projecttemplates/RelyingPartyLogic/Model.Client.cs
diff options
context:
space:
mode:
Diffstat (limited to 'projecttemplates/RelyingPartyLogic/Model.Client.cs')
-rw-r--r--projecttemplates/RelyingPartyLogic/Model.Client.cs23
1 files changed, 20 insertions, 3 deletions
diff --git a/projecttemplates/RelyingPartyLogic/Model.Client.cs b/projecttemplates/RelyingPartyLogic/Model.Client.cs
index 9426408..3b3bce5 100644
--- a/projecttemplates/RelyingPartyLogic/Model.Client.cs
+++ b/projecttemplates/RelyingPartyLogic/Model.Client.cs
@@ -6,13 +6,30 @@
namespace RelyingPartyLogic {
using System;
+ using System.Collections.Generic;
using DotNetOpenAuth.OAuth2;
public partial class Client : IConsumerDescription {
- public Uri Callback {
- get { return this.CallbackAsString != null ? new Uri(this.CallbackAsString) : null; }
- set { this.CallbackAsString = value != null ? value.AbsoluteUri : null; }
+ /// <summary>
+ /// Gets the allowed callback URIs that this client has pre-registered with the service provider, if any.
+ /// </summary>
+ /// <value>
+ /// The URIs that user authorization responses may be directed to; must not be <c>null</c>, but may be empty.
+ /// </value>
+ /// <remarks>
+ /// The first element in this list (if any) will be used as the default client redirect URL if the client sends an authorization request without a redirect URL.
+ /// If the list is empty, any callback is allowed for this client.
+ /// </remarks>
+ public List<Uri> AllowedCallbacks {
+ get {
+ var result = new List<Uri>();
+ if (this.CallbackAsString != null) {
+ result.Add(new Uri(this.CallbackAsString));
+ }
+
+ return result;
+ }
}
#region IConsumerDescription Members