diff options
Diffstat (limited to 'starterkits/WebFormsRelyingParty/Model.cs')
-rw-r--r-- | starterkits/WebFormsRelyingParty/Model.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/starterkits/WebFormsRelyingParty/Model.cs b/starterkits/WebFormsRelyingParty/Model.cs new file mode 100644 index 0000000..f471c97 --- /dev/null +++ b/starterkits/WebFormsRelyingParty/Model.cs @@ -0,0 +1,21 @@ +namespace WebFormsOpenIdRelyingParty { + 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; + } + } +} |