diff options
Diffstat (limited to 'Timeline.Tests/Helpers/Authentication/PrincipalHelper.cs')
-rw-r--r-- | Timeline.Tests/Helpers/Authentication/PrincipalHelper.cs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Timeline.Tests/Helpers/Authentication/PrincipalHelper.cs b/Timeline.Tests/Helpers/Authentication/PrincipalHelper.cs deleted file mode 100644 index 214472a2..00000000 --- a/Timeline.Tests/Helpers/Authentication/PrincipalHelper.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Linq;
-using System.Security.Claims;
-using Timeline.Models;
-
-namespace Timeline.Tests.Helpers.Authentication
-{
- public static class PrincipalHelper
- {
- internal const string AuthScheme = "TESTAUTH";
-
- internal static ClaimsPrincipal Create(string username, bool administrator)
- {
- var identity = new ClaimsIdentity(AuthScheme);
- identity.AddClaim(new Claim(identity.NameClaimType, username, ClaimValueTypes.String));
- identity.AddClaims(UserRoleConvert.ToArray(administrator).Select(role => new Claim(identity.RoleClaimType, role, ClaimValueTypes.String)));
-
- var principal = new ClaimsPrincipal();
- principal.AddIdentity(identity);
-
- return principal;
- }
- }
-}
|