diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-11-15 15:30:38 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-11-15 15:30:38 -0800 |
commit | 588bc035f93607b4179df9f7f42175c08e6cf7b5 (patch) | |
tree | 965802693892616db01cf6997f060dda44518697 /projecttemplates/RelyingPartyLogic/Model.AuthenticationToken.cs | |
parent | 888abd61a54576ff244533693df77f174f03c2bb (diff) | |
parent | 2ff3e125a7db35ce459b89add580aedf7d2bd7d4 (diff) | |
download | DotNetOpenAuth-588bc035f93607b4179df9f7f42175c08e6cf7b5.zip DotNetOpenAuth-588bc035f93607b4179df9f7f42175c08e6cf7b5.tar.gz DotNetOpenAuth-588bc035f93607b4179df9f7f42175c08e6cf7b5.tar.bz2 |
Merged working branch that splits the RP project template into two projects: a web project and a class library.
Merge branch 'projecttemplateLib'
Diffstat (limited to 'projecttemplates/RelyingPartyLogic/Model.AuthenticationToken.cs')
-rw-r--r-- | projecttemplates/RelyingPartyLogic/Model.AuthenticationToken.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/projecttemplates/RelyingPartyLogic/Model.AuthenticationToken.cs b/projecttemplates/RelyingPartyLogic/Model.AuthenticationToken.cs new file mode 100644 index 0000000..e44fd83 --- /dev/null +++ b/projecttemplates/RelyingPartyLogic/Model.AuthenticationToken.cs @@ -0,0 +1,21 @@ +namespace RelyingPartyLogic { + 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(Utilities.ApplicationRoot, "infocard/").AbsoluteUri; } + } + + public static string SynthesizeClaimedIdentifierFromInfoCard(string uniqueId) { + string synthesizedClaimedId = UriPrefixForInfoCard + Uri.EscapeDataString(uniqueId); + return synthesizedClaimedId; + } + } +} |