diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-30 08:47:30 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-30 08:47:30 -0700 |
commit | 7d38eefb65928a1e80036ec006b0e129dc2cface (patch) | |
tree | 395690658adf3fc3226d7bb5696f09af7c69b7c9 /samples/OAuthServiceProvider/Code/Client.cs | |
parent | 5625a18030037a0f088cd3e3581e80ccb68ab187 (diff) | |
download | DotNetOpenAuth-7d38eefb65928a1e80036ec006b0e129dc2cface.zip DotNetOpenAuth-7d38eefb65928a1e80036ec006b0e129dc2cface.tar.gz DotNetOpenAuth-7d38eefb65928a1e80036ec006b0e129dc2cface.tar.bz2 |
Multiple client callback URLs are now supported.
And some StyleCop cleanup.
Diffstat (limited to 'samples/OAuthServiceProvider/Code/Client.cs')
-rw-r--r-- | samples/OAuthServiceProvider/Code/Client.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/samples/OAuthServiceProvider/Code/Client.cs b/samples/OAuthServiceProvider/Code/Client.cs index 43e282d..bb4007e 100644 --- a/samples/OAuthServiceProvider/Code/Client.cs +++ b/samples/OAuthServiceProvider/Code/Client.cs @@ -14,12 +14,25 @@ namespace OAuthServiceProvider.Code { public partial class Client : IConsumerDescription { #region IConsumerDescription Members + /// <summary> + /// Gets the client secret. + /// </summary> string IConsumerDescription.Secret { get { return this.ClientSecret; } } - Uri IConsumerDescription.Callback { - get { return string.IsNullOrEmpty(this.Callback) ? null : new Uri(this.Callback); } + /// <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> + List<Uri> IConsumerDescription.AllowedCallbacks { + get { return string.IsNullOrEmpty(this.Callback) ? new List<Uri>() : new List<Uri>(new Uri[] { new Uri(this.Callback) }); } } #endregion |