diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-11-10 08:36:21 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-11-10 08:36:21 -0800 |
commit | 8f53e90739e6b0511598c9cdde1820a96788b4ce (patch) | |
tree | f184205563c61eec364e56f2bd7e74b91c1b06cd /projecttemplates/WebFormsRelyingParty/Model.Consumer.cs | |
parent | 75737b85f5dce833c4fed0b1c839150fc1e6c3dc (diff) | |
download | DotNetOpenAuth-8f53e90739e6b0511598c9cdde1820a96788b4ce.zip DotNetOpenAuth-8f53e90739e6b0511598c9cdde1820a96788b4ce.tar.gz DotNetOpenAuth-8f53e90739e6b0511598c9cdde1820a96788b4ce.tar.bz2 |
Added initial OAuth token manager and entities.
Haven't checked in changes to db generating SQL yet.
Diffstat (limited to 'projecttemplates/WebFormsRelyingParty/Model.Consumer.cs')
-rw-r--r-- | projecttemplates/WebFormsRelyingParty/Model.Consumer.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/projecttemplates/WebFormsRelyingParty/Model.Consumer.cs b/projecttemplates/WebFormsRelyingParty/Model.Consumer.cs new file mode 100644 index 0000000..20a1ccc --- /dev/null +++ b/projecttemplates/WebFormsRelyingParty/Model.Consumer.cs @@ -0,0 +1,34 @@ +namespace WebFormsRelyingParty { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Security.Cryptography.X509Certificates; + using System.Web; + using DotNetOpenAuth.OAuth; + using DotNetOpenAuth.OAuth.ChannelElements; + + public partial class Consumer : IConsumerDescription { + public VerificationCodeFormat VerificationCodeFormat { + get { return (VerificationCodeFormat)this.VerificationCodeFormatAsInt; } + set { this.VerificationCodeFormatAsInt = (int)value; } + } + + public X509Certificate2 Certificate { + get { return this.X509CertificateAsBinary != null ? new X509Certificate2(this.X509CertificateAsBinary) : null; } + set { this.X509CertificateAsBinary = value != null ? value.RawData : null; } + } + + public Uri Callback { + get { return this.CallbackAsString != null ? new Uri(this.CallbackAsString) : null; } + set { this.CallbackAsString = value != null ? value.AbsoluteUri : null; } + } + + string IConsumerDescription.Secret { + get { return this.ConsumerSecret; } + } + + string IConsumerDescription.Key { + get { return this.ConsumerKey; } + } + } +} |