summaryrefslogtreecommitdiffstats
path: root/projecttemplates/WebFormsRelyingParty/Model.AuthenticationToken.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-11-09 08:44:30 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-11-09 08:44:30 -0800
commit75737b85f5dce833c4fed0b1c839150fc1e6c3dc (patch)
tree7248275682931c1d88d4ec9a0002d4c88b1f1b7c /projecttemplates/WebFormsRelyingParty/Model.AuthenticationToken.cs
parentb00d9da0af1cb5bcd958ec6c402032d9d95e6c0d (diff)
downloadDotNetOpenAuth-75737b85f5dce833c4fed0b1c839150fc1e6c3dc.zip
DotNetOpenAuth-75737b85f5dce833c4fed0b1c839150fc1e6c3dc.tar.gz
DotNetOpenAuth-75737b85f5dce833c4fed0b1c839150fc1e6c3dc.tar.bz2
Added EmailAddressVerified column to users table and code to utilize it.
Diffstat (limited to 'projecttemplates/WebFormsRelyingParty/Model.AuthenticationToken.cs')
-rw-r--r--projecttemplates/WebFormsRelyingParty/Model.AuthenticationToken.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/projecttemplates/WebFormsRelyingParty/Model.AuthenticationToken.cs b/projecttemplates/WebFormsRelyingParty/Model.AuthenticationToken.cs
new file mode 100644
index 0000000..53ca10f
--- /dev/null
+++ b/projecttemplates/WebFormsRelyingParty/Model.AuthenticationToken.cs
@@ -0,0 +1,21 @@
+namespace WebFormsRelyingParty {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Web;
+
+ public partial class AuthenticationToken {
+ public bool IsInfoCard {
+ get { return this.ClaimedIdentifier.StartsWith(UriPrefixForInfoCard); }
+ }
+
+ private static string UriPrefixForInfoCard {
+ get { return new Uri(HttpContext.Current.Request.Url, Global.ApplicationPath + "infocard/").AbsoluteUri; }
+ }
+
+ public static string SynthesizeClaimedIdentifierFromInfoCard(string uniqueId) {
+ string synthesizedClaimedId = UriPrefixForInfoCard + Uri.EscapeDataString(uniqueId);
+ return synthesizedClaimedId;
+ }
+ }
+}