зеркало из https://github.com/aspnet/Identity.git
Delete old files
This commit is contained in:
Родитель
214db69b0a
Коммит
54400baed3
|
@ -1,43 +0,0 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace Microsoft.AspNet.Identity
|
||||
{
|
||||
public class ClaimTypeOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// ClaimType used for the security stamp by default
|
||||
/// </summary>
|
||||
public static readonly string DefaultSecurityStampClaimType = "AspNet.Identity.SecurityStamp";
|
||||
|
||||
public ClaimTypeOptions()
|
||||
{
|
||||
Role = ClaimTypes.Role;
|
||||
SecurityStamp = DefaultSecurityStampClaimType;
|
||||
UserId = ClaimTypes.NameIdentifier;
|
||||
UserName = ClaimTypes.Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Claim type used for role claims
|
||||
/// </summary>
|
||||
public string Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Claim type used for the user name
|
||||
/// </summary>
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Claim type used for the user id
|
||||
/// </summary>
|
||||
public string UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Claim type used for the user security stamp
|
||||
/// </summary>
|
||||
public string SecurityStamp { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.AspNet.Identity.EntityFramework.InMemory.Test;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNet.Identity
|
||||
{
|
||||
public static class EntityIdentityBuilderExtensions
|
||||
{
|
||||
public static IdentityBuilder<TUser, TRole> AddEntityFrameworkInMemory<TUser, TRole, TDbContext>(this IdentityBuilder<TUser, TRole> builder)
|
||||
where TUser : InMemoryUser
|
||||
where TRole : IdentityRole
|
||||
where TDbContext : DbContext
|
||||
{
|
||||
builder.Services.AddScoped<TDbContext>();
|
||||
builder.Services.AddScoped<IUserStore<TUser>, InMemoryUserStore<TUser, TDbContext>>();
|
||||
builder.Services.AddScoped<IRoleStore<TRole>, RoleStore<TRole, TDbContext>>();
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче