diff options
Diffstat (limited to 'samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs')
-rw-r--r-- | samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs b/samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs index 9ead7c1..5771279 100644 --- a/samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs +++ b/samples/OpenIdProviderMvc/Code/AnonymousIdentifierProvider.cs @@ -10,7 +10,7 @@ using OpenIdProviderMvc.Models; namespace OpenIdProviderMvc.Code { internal class AnonymousIdentifierProvider : AnonymousIdentifierProviderBase { internal AnonymousIdentifierProvider() - : base(GetIdentifierBase("anon")) { + : base(Util.GetAppPathRootedUri("anon?id=")) { } protected override byte[] GetHashSaltForLocalIdentifier(Identifier localIdentifier) { @@ -22,22 +22,5 @@ namespace OpenIdProviderMvc.Code { return Convert.FromBase64String(salt); ////return AnonymousIdentifierProviderBase.GetNewSalt(5); } - - private static Uri GetIdentifierBase(string subPath) { - if (HttpContext.Current == null) { - throw new InvalidOperationException(); - } - - if (String.IsNullOrEmpty(subPath)) { - throw new ArgumentNullException("subPath"); - } - - string appPath = HttpContext.Current.Request.ApplicationPath; - if (!appPath.EndsWith("/")) { - appPath += "/"; - } - - return new Uri(HttpContext.Current.Request.Url, appPath + subPath + "/"); - } } } |