mirror of https://github.com/abpframework/abp.git
239 changed files with 10936 additions and 11177 deletions
@ -1,9 +1,8 @@ |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class GetIdentityRolesInput : PagedAndSortedResultRequestDto |
|||
{ |
|||
public class GetIdentityRolesInput : PagedAndSortedResultRequestDto |
|||
{ |
|||
public string Filter { get; set; } |
|||
} |
|||
public string Filter { get; set; } |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class GetIdentityUsersInput : PagedAndSortedResultRequestDto |
|||
{ |
|||
public class GetIdentityUsersInput : PagedAndSortedResultRequestDto |
|||
{ |
|||
public string Filter { get; set; } |
|||
} |
|||
public string Filter { get; set; } |
|||
} |
|||
|
|||
@ -1,37 +1,36 @@ |
|||
using Volo.Abp.Reflection; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityPermissions |
|||
{ |
|||
public static class IdentityPermissions |
|||
{ |
|||
public const string GroupName = "AbpIdentity"; |
|||
public const string GroupName = "AbpIdentity"; |
|||
|
|||
public static class Roles |
|||
{ |
|||
public const string Default = GroupName + ".Roles"; |
|||
public const string Create = Default + ".Create"; |
|||
public const string Update = Default + ".Update"; |
|||
public const string Delete = Default + ".Delete"; |
|||
public const string ManagePermissions = Default + ".ManagePermissions"; |
|||
} |
|||
public static class Roles |
|||
{ |
|||
public const string Default = GroupName + ".Roles"; |
|||
public const string Create = Default + ".Create"; |
|||
public const string Update = Default + ".Update"; |
|||
public const string Delete = Default + ".Delete"; |
|||
public const string ManagePermissions = Default + ".ManagePermissions"; |
|||
} |
|||
|
|||
public static class Users |
|||
{ |
|||
public const string Default = GroupName + ".Users"; |
|||
public const string Create = Default + ".Create"; |
|||
public const string Update = Default + ".Update"; |
|||
public const string Delete = Default + ".Delete"; |
|||
public const string ManagePermissions = Default + ".ManagePermissions"; |
|||
} |
|||
public static class Users |
|||
{ |
|||
public const string Default = GroupName + ".Users"; |
|||
public const string Create = Default + ".Create"; |
|||
public const string Update = Default + ".Update"; |
|||
public const string Delete = Default + ".Delete"; |
|||
public const string ManagePermissions = Default + ".ManagePermissions"; |
|||
} |
|||
|
|||
public static class UserLookup |
|||
{ |
|||
public const string Default = GroupName + ".UserLookup"; |
|||
} |
|||
public static class UserLookup |
|||
{ |
|||
public const string Default = GroupName + ".UserLookup"; |
|||
} |
|||
|
|||
public static string[] GetAll() |
|||
{ |
|||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(IdentityPermissions)); |
|||
} |
|||
public static string[] GetAll() |
|||
{ |
|||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(IdentityPermissions)); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityRemoteServiceConsts |
|||
{ |
|||
public static class IdentityRemoteServiceConsts |
|||
{ |
|||
public const string RemoteServiceName = "AbpIdentity"; |
|||
public const string RemoteServiceName = "AbpIdentity"; |
|||
|
|||
public const string ModuleName = "identity"; |
|||
} |
|||
public const string ModuleName = "identity"; |
|||
} |
|||
|
|||
@ -1,7 +1,6 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityRoleCreateDto : IdentityRoleCreateOrUpdateDtoBase |
|||
{ |
|||
public class IdentityRoleCreateDto : IdentityRoleCreateOrUpdateDtoBase |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityRoleUpdateDto : IdentityRoleCreateOrUpdateDtoBase, IHasConcurrencyStamp |
|||
{ |
|||
public class IdentityRoleUpdateDto : IdentityRoleCreateOrUpdateDtoBase, IHasConcurrencyStamp |
|||
{ |
|||
public string ConcurrencyStamp { get; set; } |
|||
} |
|||
} |
|||
public string ConcurrencyStamp { get; set; } |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityUserUpdateRolesDto |
|||
{ |
|||
public class IdentityUserUpdateRolesDto |
|||
{ |
|||
[Required] |
|||
public string[] RoleNames { get; set; } |
|||
} |
|||
} |
|||
[Required] |
|||
public string[] RoleNames { get; set; } |
|||
} |
|||
|
|||
@ -1,7 +1,6 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class UserLookupCountInputDto |
|||
{ |
|||
public class UserLookupCountInputDto |
|||
{ |
|||
public string Filter { get; set; } |
|||
} |
|||
} |
|||
public string Filter { get; set; } |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class UserLookupSearchInputDto : PagedAndSortedResultRequestDto |
|||
{ |
|||
public class UserLookupSearchInputDto : PagedAndSortedResultRequestDto |
|||
{ |
|||
public string Filter { get; set; } |
|||
} |
|||
} |
|||
public string Filter { get; set; } |
|||
} |
|||
|
|||
@ -1,16 +1,15 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class AbpIdentityApplicationModuleAutoMapperProfile : Profile |
|||
{ |
|||
public class AbpIdentityApplicationModuleAutoMapperProfile : Profile |
|||
public AbpIdentityApplicationModuleAutoMapperProfile() |
|||
{ |
|||
public AbpIdentityApplicationModuleAutoMapperProfile() |
|||
{ |
|||
CreateMap<IdentityUser, IdentityUserDto>() |
|||
.MapExtraProperties(); |
|||
CreateMap<IdentityUser, IdentityUserDto>() |
|||
.MapExtraProperties(); |
|||
|
|||
CreateMap<IdentityRole, IdentityRoleDto>() |
|||
.MapExtraProperties(); |
|||
} |
|||
CreateMap<IdentityRole, IdentityRoleDto>() |
|||
.MapExtraProperties(); |
|||
} |
|||
} |
|||
|
|||
@ -1,14 +1,13 @@ |
|||
using Volo.Abp.Application.Services; |
|||
using Volo.Abp.Identity.Localization; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public abstract class IdentityAppServiceBase : ApplicationService |
|||
{ |
|||
public abstract class IdentityAppServiceBase : ApplicationService |
|||
protected IdentityAppServiceBase() |
|||
{ |
|||
protected IdentityAppServiceBase() |
|||
{ |
|||
ObjectMapperContext = typeof(AbpIdentityApplicationModule); |
|||
LocalizationResource = typeof(IdentityResource); |
|||
} |
|||
ObjectMapperContext = typeof(AbpIdentityApplicationModule); |
|||
LocalizationResource = typeof(IdentityResource); |
|||
} |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
namespace Volo.Abp.Identity.AspNetCore |
|||
namespace Volo.Abp.Identity.AspNetCore; |
|||
|
|||
public class AbpIdentityAspNetCoreOptions |
|||
{ |
|||
public class AbpIdentityAspNetCoreOptions |
|||
{ |
|||
/// <summary>
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool ConfigureAuthentication { get; set; } = true; |
|||
} |
|||
/// <summary>
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool ConfigureAuthentication { get; set; } = true; |
|||
} |
|||
|
|||
@ -1,37 +1,36 @@ |
|||
using Microsoft.AspNetCore.Identity; |
|||
|
|||
namespace Volo.Abp.Identity.AspNetCore |
|||
namespace Volo.Abp.Identity.AspNetCore; |
|||
|
|||
public static class SignInResultExtensions |
|||
{ |
|||
public static class SignInResultExtensions |
|||
public static string ToIdentitySecurityLogAction(this SignInResult result) |
|||
{ |
|||
public static string ToIdentitySecurityLogAction(this SignInResult result) |
|||
if (result.Succeeded) |
|||
{ |
|||
if (result.Succeeded) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginSucceeded; |
|||
} |
|||
|
|||
if (result.IsLockedOut) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginLockedout; |
|||
} |
|||
return IdentitySecurityLogActionConsts.LoginSucceeded; |
|||
} |
|||
|
|||
if (result.RequiresTwoFactor) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginRequiresTwoFactor; |
|||
} |
|||
if (result.IsLockedOut) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginLockedout; |
|||
} |
|||
|
|||
if (result.IsNotAllowed) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginNotAllowed; |
|||
} |
|||
if (result.RequiresTwoFactor) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginRequiresTwoFactor; |
|||
} |
|||
|
|||
if (!result.Succeeded) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginFailed; |
|||
} |
|||
if (result.IsNotAllowed) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginNotAllowed; |
|||
} |
|||
|
|||
if (!result.Succeeded) |
|||
{ |
|||
return IdentitySecurityLogActionConsts.LoginFailed; |
|||
} |
|||
|
|||
return IdentitySecurityLogActionConsts.LoginFailed; |
|||
} |
|||
} |
|||
|
|||
@ -1,19 +1,18 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
|
|||
namespace Volo.Abp.Identity.Blazor |
|||
namespace Volo.Abp.Identity.Blazor; |
|||
|
|||
public class AbpIdentityBlazorAutoMapperProfile : Profile |
|||
{ |
|||
public class AbpIdentityBlazorAutoMapperProfile : Profile |
|||
public AbpIdentityBlazorAutoMapperProfile() |
|||
{ |
|||
public AbpIdentityBlazorAutoMapperProfile() |
|||
{ |
|||
CreateMap<IdentityUserDto, IdentityUserUpdateDto>() |
|||
.MapExtraProperties() |
|||
.Ignore(x => x.Password) |
|||
.Ignore(x => x.RoleNames); |
|||
|
|||
CreateMap<IdentityRoleDto, IdentityRoleUpdateDto>() |
|||
.MapExtraProperties(); |
|||
} |
|||
CreateMap<IdentityUserDto, IdentityUserUpdateDto>() |
|||
.MapExtraProperties() |
|||
.Ignore(x => x.Password) |
|||
.Ignore(x => x.RoleNames); |
|||
|
|||
CreateMap<IdentityRoleDto, IdentityRoleUpdateDto>() |
|||
.MapExtraProperties(); |
|||
} |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
namespace Volo.Abp.Identity.Blazor |
|||
namespace Volo.Abp.Identity.Blazor; |
|||
|
|||
public class IdentityMenuNames |
|||
{ |
|||
public class IdentityMenuNames |
|||
{ |
|||
public const string GroupName = "AbpIdentity"; |
|||
public const string GroupName = "AbpIdentity"; |
|||
|
|||
public const string Roles = GroupName + ".Roles"; |
|||
public const string Users = GroupName + ".Users"; |
|||
} |
|||
public const string Roles = GroupName + ".Roles"; |
|||
public const string Users = GroupName + ".Users"; |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using Microsoft.AspNetCore.Components; |
|||
|
|||
namespace Volo.Abp.Identity.Blazor.Pages.Identity |
|||
namespace Volo.Abp.Identity.Blazor.Pages.Identity; |
|||
|
|||
public partial class RoleNameComponent : ComponentBase |
|||
{ |
|||
public partial class RoleNameComponent : ComponentBase |
|||
{ |
|||
[Parameter] public object Data { get; set; } |
|||
} |
|||
} |
|||
[Parameter] public object Data { get; set; } |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public interface IUserRoleFinder |
|||
{ |
|||
public interface IUserRoleFinder |
|||
{ |
|||
Task<string[]> GetRolesAsync(Guid userId); |
|||
} |
|||
Task<string[]> GetRolesAsync(Guid userId); |
|||
} |
|||
|
|||
@ -1,25 +1,24 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityClaimTypeConsts |
|||
{ |
|||
public class IdentityClaimTypeConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxNameLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 512
|
|||
/// </summary>
|
|||
public static int MaxRegexLength { get; set; } = 512; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 128
|
|||
/// </summary>
|
|||
public static int MaxRegexDescriptionLength { get; set; } = 128; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxDescriptionLength { get; set; } = 256; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxNameLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 512
|
|||
/// </summary>
|
|||
public static int MaxRegexLength { get; set; } = 512; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 128
|
|||
/// </summary>
|
|||
public static int MaxRegexDescriptionLength { get; set; } = 128; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxDescriptionLength { get; set; } = 256; |
|||
} |
|||
|
|||
@ -1,24 +1,23 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
[Serializable] |
|||
public class IdentityClaimTypeEto |
|||
{ |
|||
[Serializable] |
|||
public class IdentityClaimTypeEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
|
|||
public bool Required { get; set; } |
|||
public bool Required { get; set; } |
|||
|
|||
public bool IsStatic { get; set; } |
|||
public bool IsStatic { get; set; } |
|||
|
|||
public string Regex { get; set; } |
|||
public string Regex { get; set; } |
|||
|
|||
public string RegexDescription { get; set; } |
|||
public string RegexDescription { get; set; } |
|||
|
|||
public string Description { get; set; } |
|||
public string Description { get; set; } |
|||
|
|||
public IdentityClaimValueType ValueType { get; set; } |
|||
} |
|||
public IdentityClaimValueType ValueType { get; set; } |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public enum IdentityClaimValueType |
|||
{ |
|||
public enum IdentityClaimValueType |
|||
{ |
|||
String, |
|||
Int, |
|||
Boolean, |
|||
DateTime |
|||
} |
|||
String, |
|||
Int, |
|||
Boolean, |
|||
DateTime |
|||
} |
|||
|
|||
@ -1,14 +1,13 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityErrorCodes |
|||
{ |
|||
public static class IdentityErrorCodes |
|||
{ |
|||
public const string UserSelfDeletion = "Volo.Abp.Identity:010001"; |
|||
public const string MaxAllowedOuMembership = "Volo.Abp.Identity:010002"; |
|||
public const string ExternalUserPasswordChange = "Volo.Abp.Identity:010003"; |
|||
public const string DuplicateOrganizationUnitDisplayName = "Volo.Abp.Identity:010004"; |
|||
public const string StaticRoleRenaming = "Volo.Abp.Identity:010005"; |
|||
public const string StaticRoleDeletion = "Volo.Abp.Identity:010006"; |
|||
public const string UsersCanNotChangeTwoFactor = "Volo.Abp.Identity:010007"; |
|||
public const string CanNotChangeTwoFactor = "Volo.Abp.Identity:010008"; |
|||
} |
|||
public const string UserSelfDeletion = "Volo.Abp.Identity:010001"; |
|||
public const string MaxAllowedOuMembership = "Volo.Abp.Identity:010002"; |
|||
public const string ExternalUserPasswordChange = "Volo.Abp.Identity:010003"; |
|||
public const string DuplicateOrganizationUnitDisplayName = "Volo.Abp.Identity:010004"; |
|||
public const string StaticRoleRenaming = "Volo.Abp.Identity:010005"; |
|||
public const string StaticRoleDeletion = "Volo.Abp.Identity:010006"; |
|||
public const string UsersCanNotChangeTwoFactor = "Volo.Abp.Identity:010007"; |
|||
public const string CanNotChangeTwoFactor = "Volo.Abp.Identity:010008"; |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityRoleClaimConsts |
|||
{ |
|||
public static class IdentityRoleClaimConsts |
|||
{ |
|||
public static int MaxClaimTypeLength { get; set; } = IdentityUserClaimConsts.MaxClaimTypeLength; |
|||
public static int MaxClaimTypeLength { get; set; } = IdentityUserClaimConsts.MaxClaimTypeLength; |
|||
|
|||
public static int MaxClaimValueLength { get; set; } = IdentityUserClaimConsts.MaxClaimValueLength; |
|||
} |
|||
public static int MaxClaimValueLength { get; set; } = IdentityUserClaimConsts.MaxClaimValueLength; |
|||
} |
|||
|
|||
@ -1,15 +1,14 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityRoleConsts |
|||
{ |
|||
public static class IdentityRoleConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxNameLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxNormalizedNameLength { get; set; } = 256; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxNameLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxNormalizedNameLength { get; set; } = 256; |
|||
} |
|||
|
|||
@ -1,20 +1,19 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
[Serializable] |
|||
public class IdentityRoleEto |
|||
{ |
|||
[Serializable] |
|||
public class IdentityRoleEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
public Guid? TenantId { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
|
|||
public Guid? TenantId { get; set; } |
|||
public bool IsDefault { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
|
|||
public bool IsDefault { get; set; } |
|||
public bool IsStatic { get; set; } |
|||
|
|||
public bool IsStatic { get; set; } |
|||
|
|||
public bool IsPublic { get; set; } |
|||
} |
|||
} |
|||
public bool IsPublic { get; set; } |
|||
} |
|||
|
|||
@ -1,16 +1,15 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
[Serializable] |
|||
public class IdentityRoleNameChangedEto |
|||
{ |
|||
[Serializable] |
|||
public class IdentityRoleNameChangedEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
public Guid? TenantId { get; set; } |
|||
public Guid? TenantId { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
public string Name { get; set; } |
|||
|
|||
public string OldName { get; set; } |
|||
} |
|||
} |
|||
public string OldName { get; set; } |
|||
} |
|||
|
|||
@ -1,33 +1,32 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentitySecurityLogActionConsts |
|||
{ |
|||
public class IdentitySecurityLogActionConsts |
|||
{ |
|||
public static string LoginSucceeded { get; set; } = "LoginSucceeded"; |
|||
public static string LoginSucceeded { get; set; } = "LoginSucceeded"; |
|||
|
|||
public static string LoginLockedout { get; set; } = "LoginLockedout"; |
|||
public static string LoginLockedout { get; set; } = "LoginLockedout"; |
|||
|
|||
public static string LoginNotAllowed { get; set; } = "LoginNotAllowed"; |
|||
public static string LoginNotAllowed { get; set; } = "LoginNotAllowed"; |
|||
|
|||
public static string LoginRequiresTwoFactor { get; set; } = "LoginRequiresTwoFactor"; |
|||
public static string LoginRequiresTwoFactor { get; set; } = "LoginRequiresTwoFactor"; |
|||
|
|||
public static string LoginFailed { get; set; } = "LoginFailed"; |
|||
public static string LoginFailed { get; set; } = "LoginFailed"; |
|||
|
|||
public static string LoginInvalidUserName { get; set; } = "LoginInvalidUserName"; |
|||
public static string LoginInvalidUserName { get; set; } = "LoginInvalidUserName"; |
|||
|
|||
public static string LoginInvalidUserNameOrPassword { get; set; } = "LoginInvalidUserNameOrPassword"; |
|||
public static string LoginInvalidUserNameOrPassword { get; set; } = "LoginInvalidUserNameOrPassword"; |
|||
|
|||
public static string Logout { get; set; } = "Logout"; |
|||
public static string Logout { get; set; } = "Logout"; |
|||
|
|||
public static string ChangeUserName { get; set; } = "ChangeUserName"; |
|||
public static string ChangeUserName { get; set; } = "ChangeUserName"; |
|||
|
|||
public static string ChangeEmail { get; set; } = "ChangeEmail"; |
|||
public static string ChangeEmail { get; set; } = "ChangeEmail"; |
|||
|
|||
public static string ChangePhoneNumber { get; set; } = "ChangePhoneNumber"; |
|||
public static string ChangePhoneNumber { get; set; } = "ChangePhoneNumber"; |
|||
|
|||
public static string ChangePassword { get; set; } = "ChangePassword"; |
|||
public static string ChangePassword { get; set; } = "ChangePassword"; |
|||
|
|||
public static string TwoFactorEnabled { get; set; } = "TwoFactorEnabled"; |
|||
public static string TwoFactorEnabled { get; set; } = "TwoFactorEnabled"; |
|||
|
|||
public static string TwoFactorDisabled { get; set; } = "TwoFactorDisabled"; |
|||
} |
|||
public static string TwoFactorDisabled { get; set; } = "TwoFactorDisabled"; |
|||
} |
|||
|
|||
@ -1,52 +1,51 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentitySecurityLogConsts |
|||
{ |
|||
public class IdentitySecurityLogConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 96
|
|||
/// </summary>
|
|||
public static int MaxApplicationNameLength { get; set; } = 96; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 96
|
|||
/// </summary>
|
|||
public static int MaxIdentityLength { get; set; } = 96; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 96
|
|||
/// </summary>
|
|||
public static int MaxActionLength { get; set; } = 96; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxUserNameLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxTenantNameLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxClientIpAddressLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxClientIdLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxCorrelationIdLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 512
|
|||
/// </summary>
|
|||
public static int MaxBrowserInfoLength { get; set; } = 512; |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// Default value: 96
|
|||
/// </summary>
|
|||
public static int MaxApplicationNameLength { get; set; } = 96; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 96
|
|||
/// </summary>
|
|||
public static int MaxIdentityLength { get; set; } = 96; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 96
|
|||
/// </summary>
|
|||
public static int MaxActionLength { get; set; } = 96; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxUserNameLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxTenantNameLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxClientIpAddressLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxClientIdLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxCorrelationIdLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 512
|
|||
/// </summary>
|
|||
public static int MaxBrowserInfoLength { get; set; } = 512; |
|||
|
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentitySecurityLogIdentityConsts |
|||
{ |
|||
public static class IdentitySecurityLogIdentityConsts |
|||
{ |
|||
public static string Identity { get; set; } = "Identity"; |
|||
public static string Identity { get; set; } = "Identity"; |
|||
|
|||
public static string IdentityExternal { get; set; } = "IdentityExternal"; |
|||
public static string IdentityExternal { get; set; } = "IdentityExternal"; |
|||
|
|||
public static string IdentityTwoFactor { get; set; } = "IdentityTwoFactor"; |
|||
} |
|||
public static string IdentityTwoFactor { get; set; } = "IdentityTwoFactor"; |
|||
} |
|||
|
|||
@ -1,15 +1,14 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityUserClaimConsts |
|||
{ |
|||
public static class IdentityUserClaimConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxClaimTypeLength { get; set; } = 256; |
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxClaimTypeLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 1024
|
|||
/// </summary>
|
|||
public static int MaxClaimValueLength { get; set; } = 1024; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 1024
|
|||
/// </summary>
|
|||
public static int MaxClaimValueLength { get; set; } = 1024; |
|||
} |
|||
|
|||
@ -1,41 +1,40 @@ |
|||
using Volo.Abp.Users; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityUserConsts |
|||
{ |
|||
public static class IdentityUserConsts |
|||
{ |
|||
public static int MaxUserNameLength { get; set; } = AbpUserConsts.MaxUserNameLength; |
|||
public static int MaxUserNameLength { get; set; } = AbpUserConsts.MaxUserNameLength; |
|||
|
|||
public static int MaxNameLength { get; set; } = AbpUserConsts.MaxNameLength; |
|||
public static int MaxNameLength { get; set; } = AbpUserConsts.MaxNameLength; |
|||
|
|||
public static int MaxSurnameLength { get; set; } = AbpUserConsts.MaxSurnameLength; |
|||
public static int MaxSurnameLength { get; set; } = AbpUserConsts.MaxSurnameLength; |
|||
|
|||
public static int MaxNormalizedUserNameLength { get; set; } = MaxUserNameLength; |
|||
public static int MaxNormalizedUserNameLength { get; set; } = MaxUserNameLength; |
|||
|
|||
public static int MaxEmailLength { get; set; } = AbpUserConsts.MaxEmailLength; |
|||
public static int MaxEmailLength { get; set; } = AbpUserConsts.MaxEmailLength; |
|||
|
|||
public static int MaxNormalizedEmailLength { get; set; } = MaxEmailLength; |
|||
public static int MaxNormalizedEmailLength { get; set; } = MaxEmailLength; |
|||
|
|||
public static int MaxPhoneNumberLength { get; set; } = AbpUserConsts.MaxPhoneNumberLength; |
|||
public static int MaxPhoneNumberLength { get; set; } = AbpUserConsts.MaxPhoneNumberLength; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 128
|
|||
/// </summary>
|
|||
public static int MaxPasswordLength { get; set; } = 128; |
|||
/// <summary>
|
|||
/// Default value: 128
|
|||
/// </summary>
|
|||
public static int MaxPasswordLength { get; set; } = 128; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxPasswordHashLength { get; set; } = 256; |
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxPasswordHashLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxSecurityStampLength { get; set; } = 256; |
|||
/// <summary>
|
|||
/// Default value: 256
|
|||
/// </summary>
|
|||
public static int MaxSecurityStampLength { get; set; } = 256; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 16
|
|||
/// </summary>
|
|||
public static int MaxLoginProviderLength { get; set; } = 16; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 16
|
|||
/// </summary>
|
|||
public static int MaxLoginProviderLength { get; set; } = 16; |
|||
} |
|||
|
|||
@ -1,20 +1,19 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityUserLoginConsts |
|||
{ |
|||
public static class IdentityUserLoginConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxLoginProviderLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 196
|
|||
/// </summary>
|
|||
public static int MaxProviderKeyLength { get; set; } = 196; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 128
|
|||
/// </summary>
|
|||
public static int MaxProviderDisplayNameLength { get; set; } = 128; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxLoginProviderLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 196
|
|||
/// </summary>
|
|||
public static int MaxProviderKeyLength { get; set; } = 196; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 128
|
|||
/// </summary>
|
|||
public static int MaxProviderDisplayNameLength { get; set; } = 128; |
|||
} |
|||
|
|||
@ -1,15 +1,14 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class IdentityUserTokenConsts |
|||
{ |
|||
public static class IdentityUserTokenConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxLoginProviderLength { get; set; } = 64; |
|||
/// <summary>
|
|||
/// Default value: 64
|
|||
/// </summary>
|
|||
public static int MaxLoginProviderLength { get; set; } = 64; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 128
|
|||
/// </summary>
|
|||
public static int MaxNameLength { get; set; } = 128; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 128
|
|||
/// </summary>
|
|||
public static int MaxNameLength { get; set; } = 128; |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class LinkUserTokenProviderConsts |
|||
{ |
|||
public static class LinkUserTokenProviderConsts |
|||
{ |
|||
public static string LinkUserTokenProviderName { get; set; } = "AbpLinkUser"; |
|||
public static string LinkUserTokenProviderName { get; set; } = "AbpLinkUser"; |
|||
|
|||
public static string LinkUserTokenPurpose { get; set; } = "AbpLinkUser"; |
|||
public static string LinkUserTokenPurpose { get; set; } = "AbpLinkUser"; |
|||
|
|||
public static string LinkUserLoginTokenPurpose { get; set; } = "AbpLinkUserLogin"; |
|||
} |
|||
public static string LinkUserLoginTokenPurpose { get; set; } = "AbpLinkUserLogin"; |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace Volo.Abp.Identity.Localization |
|||
namespace Volo.Abp.Identity.Localization; |
|||
|
|||
[LocalizationResourceName("AbpIdentity")] |
|||
public class IdentityResource |
|||
{ |
|||
[LocalizationResourceName("AbpIdentity")] |
|||
public class IdentityResource |
|||
{ |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
@ -1,25 +1,24 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class OrganizationUnitConsts |
|||
{ |
|||
public static class OrganizationUnitConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Maximum length of the DisplayName property.
|
|||
/// </summary>
|
|||
public static int MaxDisplayNameLength { get; set; } = 128; |
|||
/// <summary>
|
|||
/// Maximum length of the DisplayName property.
|
|||
/// </summary>
|
|||
public static int MaxDisplayNameLength { get; set; } = 128; |
|||
|
|||
/// <summary>
|
|||
/// Maximum depth of an OU hierarchy.
|
|||
/// </summary>
|
|||
public const int MaxDepth = 16; |
|||
/// <summary>
|
|||
/// Maximum depth of an OU hierarchy.
|
|||
/// </summary>
|
|||
public const int MaxDepth = 16; |
|||
|
|||
/// <summary>
|
|||
/// Length of a code unit between dots.
|
|||
/// </summary>
|
|||
public const int CodeUnitLength = 5; |
|||
/// <summary>
|
|||
/// Length of a code unit between dots.
|
|||
/// </summary>
|
|||
public const int CodeUnitLength = 5; |
|||
|
|||
/// <summary>
|
|||
/// Maximum length of the Code property.
|
|||
/// </summary>
|
|||
public const int MaxCodeLength = MaxDepth * (CodeUnitLength + 1) - 1; |
|||
} |
|||
/// <summary>
|
|||
/// Maximum length of the Code property.
|
|||
/// </summary>
|
|||
public const int MaxCodeLength = MaxDepth * (CodeUnitLength + 1) - 1; |
|||
} |
|||
|
|||
@ -1,16 +1,15 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
[Serializable] |
|||
public class OrganizationUnitEto |
|||
{ |
|||
[Serializable] |
|||
public class OrganizationUnitEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
public Guid? TenantId { get; set; } |
|||
public Guid? TenantId { get; set; } |
|||
|
|||
public string Code { get; set; } |
|||
public string Code { get; set; } |
|||
|
|||
public string DisplayName { get; set; } |
|||
} |
|||
} |
|||
public string DisplayName { get; set; } |
|||
} |
|||
|
|||
@ -1,52 +1,51 @@ |
|||
namespace Volo.Abp.Identity.Settings |
|||
namespace Volo.Abp.Identity.Settings; |
|||
|
|||
public static class IdentitySettingNames |
|||
{ |
|||
public static class IdentitySettingNames |
|||
private const string Prefix = "Abp.Identity"; |
|||
|
|||
public static class Password |
|||
{ |
|||
private const string PasswordPrefix = Prefix + ".Password"; |
|||
|
|||
public const string RequiredLength = PasswordPrefix + ".RequiredLength"; |
|||
public const string RequiredUniqueChars = PasswordPrefix + ".RequiredUniqueChars"; |
|||
public const string RequireNonAlphanumeric = PasswordPrefix + ".RequireNonAlphanumeric"; |
|||
public const string RequireLowercase = PasswordPrefix + ".RequireLowercase"; |
|||
public const string RequireUppercase = PasswordPrefix + ".RequireUppercase"; |
|||
public const string RequireDigit = PasswordPrefix + ".RequireDigit"; |
|||
} |
|||
|
|||
public static class Lockout |
|||
{ |
|||
private const string LockoutPrefix = Prefix + ".Lockout"; |
|||
|
|||
public const string AllowedForNewUsers = LockoutPrefix + ".AllowedForNewUsers"; |
|||
public const string LockoutDuration = LockoutPrefix + ".LockoutDuration"; |
|||
public const string MaxFailedAccessAttempts = LockoutPrefix + ".MaxFailedAccessAttempts"; |
|||
} |
|||
|
|||
public static class SignIn |
|||
{ |
|||
private const string Prefix = "Abp.Identity"; |
|||
|
|||
public static class Password |
|||
{ |
|||
private const string PasswordPrefix = Prefix + ".Password"; |
|||
|
|||
public const string RequiredLength = PasswordPrefix + ".RequiredLength"; |
|||
public const string RequiredUniqueChars = PasswordPrefix + ".RequiredUniqueChars"; |
|||
public const string RequireNonAlphanumeric = PasswordPrefix + ".RequireNonAlphanumeric"; |
|||
public const string RequireLowercase = PasswordPrefix + ".RequireLowercase"; |
|||
public const string RequireUppercase = PasswordPrefix + ".RequireUppercase"; |
|||
public const string RequireDigit = PasswordPrefix + ".RequireDigit"; |
|||
} |
|||
|
|||
public static class Lockout |
|||
{ |
|||
private const string LockoutPrefix = Prefix + ".Lockout"; |
|||
|
|||
public const string AllowedForNewUsers = LockoutPrefix + ".AllowedForNewUsers"; |
|||
public const string LockoutDuration = LockoutPrefix + ".LockoutDuration"; |
|||
public const string MaxFailedAccessAttempts = LockoutPrefix + ".MaxFailedAccessAttempts"; |
|||
} |
|||
|
|||
public static class SignIn |
|||
{ |
|||
private const string SignInPrefix = Prefix + ".SignIn"; |
|||
|
|||
public const string RequireConfirmedEmail = SignInPrefix + ".RequireConfirmedEmail"; |
|||
public const string EnablePhoneNumberConfirmation = SignInPrefix + ".EnablePhoneNumberConfirmation"; |
|||
public const string RequireConfirmedPhoneNumber = SignInPrefix + ".RequireConfirmedPhoneNumber"; |
|||
} |
|||
|
|||
public static class User |
|||
{ |
|||
private const string UserPrefix = Prefix + ".User"; |
|||
|
|||
public const string IsUserNameUpdateEnabled = UserPrefix + ".IsUserNameUpdateEnabled"; |
|||
public const string IsEmailUpdateEnabled = UserPrefix + ".IsEmailUpdateEnabled"; |
|||
} |
|||
|
|||
public static class OrganizationUnit |
|||
{ |
|||
private const string OrganizationUnitPrefix = Prefix + ".OrganizationUnit"; |
|||
|
|||
public const string MaxUserMembershipCount = OrganizationUnitPrefix + ".MaxUserMembershipCount"; |
|||
} |
|||
private const string SignInPrefix = Prefix + ".SignIn"; |
|||
|
|||
public const string RequireConfirmedEmail = SignInPrefix + ".RequireConfirmedEmail"; |
|||
public const string EnablePhoneNumberConfirmation = SignInPrefix + ".EnablePhoneNumberConfirmation"; |
|||
public const string RequireConfirmedPhoneNumber = SignInPrefix + ".RequireConfirmedPhoneNumber"; |
|||
} |
|||
|
|||
public static class User |
|||
{ |
|||
private const string UserPrefix = Prefix + ".User"; |
|||
|
|||
public const string IsUserNameUpdateEnabled = UserPrefix + ".IsUserNameUpdateEnabled"; |
|||
public const string IsEmailUpdateEnabled = UserPrefix + ".IsEmailUpdateEnabled"; |
|||
} |
|||
|
|||
public static class OrganizationUnit |
|||
{ |
|||
private const string OrganizationUnitPrefix = Prefix + ".OrganizationUnit"; |
|||
|
|||
public const string MaxUserMembershipCount = OrganizationUnitPrefix + ".MaxUserMembershipCount"; |
|||
} |
|||
} |
|||
|
|||
@ -1,44 +1,43 @@ |
|||
using System; |
|||
using Volo.Abp.ObjectExtending.Modularity; |
|||
|
|||
namespace Volo.Abp.ObjectExtending |
|||
namespace Volo.Abp.ObjectExtending; |
|||
|
|||
public class IdentityModuleExtensionConfiguration : ModuleExtensionConfiguration |
|||
{ |
|||
public class IdentityModuleExtensionConfiguration : ModuleExtensionConfiguration |
|||
public IdentityModuleExtensionConfiguration ConfigureUser( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityModuleExtensionConsts.EntityNames.User, |
|||
configureAction |
|||
); |
|||
} |
|||
|
|||
public IdentityModuleExtensionConfiguration ConfigureRole( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
public IdentityModuleExtensionConfiguration ConfigureUser( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityModuleExtensionConsts.EntityNames.User, |
|||
configureAction |
|||
); |
|||
} |
|||
return this.ConfigureEntity( |
|||
IdentityModuleExtensionConsts.EntityNames.Role, |
|||
configureAction |
|||
); |
|||
} |
|||
|
|||
public IdentityModuleExtensionConfiguration ConfigureRole( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityModuleExtensionConsts.EntityNames.Role, |
|||
configureAction |
|||
); |
|||
} |
|||
public IdentityModuleExtensionConfiguration ConfigureClaimType( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityModuleExtensionConsts.EntityNames.ClaimType, |
|||
configureAction |
|||
); |
|||
} |
|||
|
|||
public IdentityModuleExtensionConfiguration ConfigureClaimType( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityModuleExtensionConsts.EntityNames.ClaimType, |
|||
configureAction |
|||
); |
|||
} |
|||
|
|||
public IdentityModuleExtensionConfiguration ConfigureOrganizationUnit( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityModuleExtensionConsts.EntityNames.OrganizationUnit, |
|||
configureAction |
|||
); |
|||
} |
|||
public IdentityModuleExtensionConfiguration ConfigureOrganizationUnit( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityModuleExtensionConsts.EntityNames.OrganizationUnit, |
|||
configureAction |
|||
); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +1,17 @@ |
|||
using System; |
|||
using Volo.Abp.ObjectExtending.Modularity; |
|||
|
|||
namespace Volo.Abp.ObjectExtending |
|||
namespace Volo.Abp.ObjectExtending; |
|||
|
|||
public static class IdentityModuleExtensionConfigurationDictionaryExtensions |
|||
{ |
|||
public static class IdentityModuleExtensionConfigurationDictionaryExtensions |
|||
public static ModuleExtensionConfigurationDictionary ConfigureIdentity( |
|||
this ModuleExtensionConfigurationDictionary modules, |
|||
Action<IdentityModuleExtensionConfiguration> configureAction) |
|||
{ |
|||
public static ModuleExtensionConfigurationDictionary ConfigureIdentity( |
|||
this ModuleExtensionConfigurationDictionary modules, |
|||
Action<IdentityModuleExtensionConfiguration> configureAction) |
|||
{ |
|||
return modules.ConfigureModule( |
|||
IdentityModuleExtensionConsts.ModuleName, |
|||
configureAction |
|||
); |
|||
} |
|||
return modules.ConfigureModule( |
|||
IdentityModuleExtensionConsts.ModuleName, |
|||
configureAction |
|||
); |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +1,17 @@ |
|||
namespace Volo.Abp.ObjectExtending |
|||
namespace Volo.Abp.ObjectExtending; |
|||
|
|||
public static class IdentityModuleExtensionConsts |
|||
{ |
|||
public static class IdentityModuleExtensionConsts |
|||
public const string ModuleName = "Identity"; |
|||
|
|||
public static class EntityNames |
|||
{ |
|||
public const string ModuleName = "Identity"; |
|||
public const string User = "User"; |
|||
|
|||
public static class EntityNames |
|||
{ |
|||
public const string User = "User"; |
|||
public const string Role = "Role"; |
|||
|
|||
public const string Role = "Role"; |
|||
public const string ClaimType = "ClaimType"; |
|||
|
|||
public const string ClaimType = "ClaimType"; |
|||
|
|||
public const string OrganizationUnit = "OrganizationUnit"; |
|||
} |
|||
public const string OrganizationUnit = "OrganizationUnit"; |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,13 +1,12 @@ |
|||
using Volo.Abp.Data; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public static class AbpIdentityDbProperties |
|||
{ |
|||
public static class AbpIdentityDbProperties |
|||
{ |
|||
public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix; |
|||
public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix; |
|||
|
|||
public static string DbSchema { get; set; } = AbpCommonDbProperties.DbSchema; |
|||
public static string DbSchema { get; set; } = AbpCommonDbProperties.DbSchema; |
|||
|
|||
public const string ConnectionStringName = "AbpIdentity"; |
|||
} |
|||
public const string ConnectionStringName = "AbpIdentity"; |
|||
} |
|||
|
|||
@ -1,12 +1,11 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class AbpIdentityOptions |
|||
{ |
|||
public class AbpIdentityOptions |
|||
{ |
|||
public ExternalLoginProviderDictionary ExternalLoginProviders { get; } |
|||
public ExternalLoginProviderDictionary ExternalLoginProviders { get; } |
|||
|
|||
public AbpIdentityOptions() |
|||
{ |
|||
ExternalLoginProviders = new ExternalLoginProviderDictionary(); |
|||
} |
|||
public AbpIdentityOptions() |
|||
{ |
|||
ExternalLoginProviders = new ExternalLoginProviderDictionary(); |
|||
} |
|||
} |
|||
|
|||
@ -1,17 +1,16 @@ |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class ExternalLoginProviderDictionary : Dictionary<string, ExternalLoginProviderInfo> |
|||
{ |
|||
public class ExternalLoginProviderDictionary : Dictionary<string, ExternalLoginProviderInfo> |
|||
/// <summary>
|
|||
/// Adds or replaces a provider.
|
|||
/// </summary>
|
|||
public void Add<TProvider>([NotNull] string name) |
|||
where TProvider : IExternalLoginProvider |
|||
{ |
|||
/// <summary>
|
|||
/// Adds or replaces a provider.
|
|||
/// </summary>
|
|||
public void Add<TProvider>([NotNull] string name) |
|||
where TProvider : IExternalLoginProvider |
|||
{ |
|||
this[name] = new ExternalLoginProviderInfo(name, typeof(TProvider)); |
|||
} |
|||
this[name] = new ExternalLoginProviderInfo(name, typeof(TProvider)); |
|||
} |
|||
} |
|||
|
|||
@ -1,25 +1,23 @@ |
|||
using System; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class ExternalLoginProviderInfo |
|||
{ |
|||
public class ExternalLoginProviderInfo |
|||
{ |
|||
public string Name { get; } |
|||
public string Name { get; } |
|||
|
|||
public Type Type |
|||
{ |
|||
get => _type; |
|||
set => _type = Check.NotNull(value, nameof(value)); |
|||
} |
|||
private Type _type; |
|||
public Type Type { |
|||
get => _type; |
|||
set => _type = Check.NotNull(value, nameof(value)); |
|||
} |
|||
private Type _type; |
|||
|
|||
public ExternalLoginProviderInfo( |
|||
[NotNull] string name, |
|||
[NotNull] Type type) |
|||
{ |
|||
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
|||
Type = Check.AssignableTo<IExternalLoginProvider>(type, nameof(type)); |
|||
} |
|||
public ExternalLoginProviderInfo( |
|||
[NotNull] string name, |
|||
[NotNull] Type type) |
|||
{ |
|||
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
|||
Type = Check.AssignableTo<IExternalLoginProvider>(type, nameof(type)); |
|||
} |
|||
} |
|||
|
|||
@ -1,36 +1,35 @@ |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class ExternalLoginUserInfo |
|||
{ |
|||
public class ExternalLoginUserInfo |
|||
{ |
|||
[CanBeNull] |
|||
public string Name { get; set; } |
|||
[CanBeNull] |
|||
public string Name { get; set; } |
|||
|
|||
[CanBeNull] |
|||
public string Surname { get; set; } |
|||
[CanBeNull] |
|||
public string Surname { get; set; } |
|||
|
|||
[CanBeNull] |
|||
public string PhoneNumber { get; set; } |
|||
[CanBeNull] |
|||
public string PhoneNumber { get; set; } |
|||
|
|||
[NotNull] |
|||
public string Email { get; private set; } |
|||
[NotNull] |
|||
public string Email { get; private set; } |
|||
|
|||
[CanBeNull] |
|||
public bool? PhoneNumberConfirmed { get; set; } |
|||
[CanBeNull] |
|||
public bool? PhoneNumberConfirmed { get; set; } |
|||
|
|||
[CanBeNull] |
|||
public bool? EmailConfirmed { get; set; } |
|||
[CanBeNull] |
|||
public bool? EmailConfirmed { get; set; } |
|||
|
|||
[CanBeNull] |
|||
public bool? TwoFactorEnabled { get; set; } |
|||
[CanBeNull] |
|||
public bool? TwoFactorEnabled { get; set; } |
|||
|
|||
[CanBeNull] |
|||
public string ProviderKey { get; set; } |
|||
[CanBeNull] |
|||
public string ProviderKey { get; set; } |
|||
|
|||
public ExternalLoginUserInfo([NotNull] string email) |
|||
{ |
|||
Email = Check.NotNullOrWhiteSpace(email, nameof(email)); |
|||
} |
|||
public ExternalLoginUserInfo([NotNull] string email) |
|||
{ |
|||
Email = Check.NotNullOrWhiteSpace(email, nameof(email)); |
|||
} |
|||
} |
|||
|
|||
@ -1,32 +1,31 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public interface IExternalLoginProvider |
|||
{ |
|||
public interface IExternalLoginProvider |
|||
{ |
|||
/// <summary>
|
|||
/// Used to try authenticate a user by this source.
|
|||
/// </summary>
|
|||
/// <param name="userName">User name or email address</param>
|
|||
/// <param name="plainPassword">Plain password of the user</param>
|
|||
/// <returns>True, indicates that this used has authenticated by this source</returns>
|
|||
Task<bool> TryAuthenticateAsync(string userName, string plainPassword); |
|||
/// <summary>
|
|||
/// Used to try authenticate a user by this source.
|
|||
/// </summary>
|
|||
/// <param name="userName">User name or email address</param>
|
|||
/// <param name="plainPassword">Plain password of the user</param>
|
|||
/// <returns>True, indicates that this used has authenticated by this source</returns>
|
|||
Task<bool> TryAuthenticateAsync(string userName, string plainPassword); |
|||
|
|||
/// <summary>
|
|||
/// This method is called when a user is authenticated by this source but the user does not exists yet.
|
|||
/// So, the source should create the user and fill the properties.
|
|||
/// </summary>
|
|||
/// <param name="userName">User name</param>
|
|||
/// <param name="providerName">The name of this provider</param>
|
|||
/// <returns>Newly created user</returns>
|
|||
Task<IdentityUser> CreateUserAsync(string userName, string providerName); |
|||
/// <summary>
|
|||
/// This method is called when a user is authenticated by this source but the user does not exists yet.
|
|||
/// So, the source should create the user and fill the properties.
|
|||
/// </summary>
|
|||
/// <param name="userName">User name</param>
|
|||
/// <param name="providerName">The name of this provider</param>
|
|||
/// <returns>Newly created user</returns>
|
|||
Task<IdentityUser> CreateUserAsync(string userName, string providerName); |
|||
|
|||
/// <summary>
|
|||
/// This method is called after an existing user is authenticated by this source.
|
|||
/// It can be used to update some properties of the user by the source.
|
|||
/// </summary>
|
|||
/// <param name="providerName">The name of this provider</param>
|
|||
/// <param name="user">The user that can be updated</param>
|
|||
Task UpdateUserAsync(IdentityUser user, string providerName); |
|||
} |
|||
/// <summary>
|
|||
/// This method is called after an existing user is authenticated by this source.
|
|||
/// It can be used to update some properties of the user by the source.
|
|||
/// </summary>
|
|||
/// <param name="providerName">The name of this provider</param>
|
|||
/// <param name="user">The user that can be updated</param>
|
|||
Task UpdateUserAsync(IdentityUser user, string providerName); |
|||
} |
|||
|
|||
@ -1,41 +1,40 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Services; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityClaimTypeManager : DomainService |
|||
{ |
|||
public class IdentityClaimTypeManager : DomainService |
|||
protected IIdentityClaimTypeRepository IdentityClaimTypeRepository { get; } |
|||
|
|||
public IdentityClaimTypeManager(IIdentityClaimTypeRepository identityClaimTypeRepository) |
|||
{ |
|||
protected IIdentityClaimTypeRepository IdentityClaimTypeRepository { get; } |
|||
IdentityClaimTypeRepository = identityClaimTypeRepository; |
|||
} |
|||
|
|||
public IdentityClaimTypeManager(IIdentityClaimTypeRepository identityClaimTypeRepository) |
|||
public virtual async Task<IdentityClaimType> CreateAsync(IdentityClaimType claimType) |
|||
{ |
|||
if (await IdentityClaimTypeRepository.AnyAsync(claimType.Name)) |
|||
{ |
|||
IdentityClaimTypeRepository = identityClaimTypeRepository; |
|||
throw new AbpException($"Name Exist: {claimType.Name}"); |
|||
} |
|||
|
|||
public virtual async Task<IdentityClaimType> CreateAsync(IdentityClaimType claimType) |
|||
{ |
|||
if (await IdentityClaimTypeRepository.AnyAsync(claimType.Name)) |
|||
{ |
|||
throw new AbpException($"Name Exist: {claimType.Name}"); |
|||
} |
|||
return await IdentityClaimTypeRepository.InsertAsync(claimType); |
|||
} |
|||
|
|||
return await IdentityClaimTypeRepository.InsertAsync(claimType); |
|||
public virtual async Task<IdentityClaimType> UpdateAsync(IdentityClaimType claimType) |
|||
{ |
|||
if (await IdentityClaimTypeRepository.AnyAsync(claimType.Name, claimType.Id)) |
|||
{ |
|||
throw new AbpException($"Name Exist: {claimType.Name}"); |
|||
} |
|||
|
|||
public virtual async Task<IdentityClaimType> UpdateAsync(IdentityClaimType claimType) |
|||
if (claimType.IsStatic) |
|||
{ |
|||
if (await IdentityClaimTypeRepository.AnyAsync(claimType.Name, claimType.Id)) |
|||
{ |
|||
throw new AbpException($"Name Exist: {claimType.Name}"); |
|||
} |
|||
|
|||
if (claimType.IsStatic) |
|||
{ |
|||
throw new AbpException($"Can not update a static ClaimType."); |
|||
} |
|||
|
|||
|
|||
return await IdentityClaimTypeRepository.UpdateAsync(claimType); |
|||
throw new AbpException($"Can not update a static ClaimType."); |
|||
} |
|||
|
|||
|
|||
return await IdentityClaimTypeRepository.UpdateAsync(claimType); |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityDataSeedResult |
|||
{ |
|||
public class IdentityDataSeedResult |
|||
{ |
|||
public bool CreatedAdminUser { get; set; } |
|||
public bool CreatedAdminUser { get; set; } |
|||
|
|||
public bool CreatedAdminRole { get; set; } |
|||
} |
|||
} |
|||
public bool CreatedAdminRole { get; set; } |
|||
} |
|||
|
|||
@ -1,16 +1,15 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.Users; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityDomainMappingProfile : Profile |
|||
{ |
|||
public class IdentityDomainMappingProfile : Profile |
|||
public IdentityDomainMappingProfile() |
|||
{ |
|||
public IdentityDomainMappingProfile() |
|||
{ |
|||
CreateMap<IdentityUser, UserEto>(); |
|||
CreateMap<IdentityClaimType, IdentityClaimTypeEto>(); |
|||
CreateMap<IdentityRole, IdentityRoleEto>(); |
|||
CreateMap<OrganizationUnit, OrganizationUnitEto>(); |
|||
} |
|||
CreateMap<IdentityUser, UserEto>(); |
|||
CreateMap<IdentityClaimType, IdentityClaimTypeEto>(); |
|||
CreateMap<IdentityRole, IdentityRoleEto>(); |
|||
CreateMap<OrganizationUnit, OrganizationUnitEto>(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,44 +1,43 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityLinkUser : BasicAggregateRoot<Guid> |
|||
{ |
|||
public class IdentityLinkUser : BasicAggregateRoot<Guid> |
|||
{ |
|||
public virtual Guid SourceUserId { get; protected set; } |
|||
public virtual Guid SourceUserId { get; protected set; } |
|||
|
|||
public virtual Guid? SourceTenantId { get; protected set; } |
|||
public virtual Guid? SourceTenantId { get; protected set; } |
|||
|
|||
public virtual Guid TargetUserId { get; protected set; } |
|||
public virtual Guid TargetUserId { get; protected set; } |
|||
|
|||
public virtual Guid? TargetTenantId { get; protected set; } |
|||
public virtual Guid? TargetTenantId { get; protected set; } |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of <see cref="IdentityLinkUser"/>.
|
|||
/// </summary>
|
|||
protected IdentityLinkUser() |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of <see cref="IdentityLinkUser"/>.
|
|||
/// </summary>
|
|||
protected IdentityLinkUser() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
public IdentityLinkUser(Guid id, IdentityLinkUserInfo sourceUser, IdentityLinkUserInfo targetUser) |
|||
: base(id) |
|||
{ |
|||
SourceUserId = sourceUser.UserId; |
|||
SourceTenantId = sourceUser.TenantId; |
|||
public IdentityLinkUser(Guid id, IdentityLinkUserInfo sourceUser, IdentityLinkUserInfo targetUser) |
|||
: base(id) |
|||
{ |
|||
SourceUserId = sourceUser.UserId; |
|||
SourceTenantId = sourceUser.TenantId; |
|||
|
|||
TargetUserId = targetUser.UserId; |
|||
TargetTenantId = targetUser.TenantId; |
|||
} |
|||
TargetUserId = targetUser.UserId; |
|||
TargetTenantId = targetUser.TenantId; |
|||
} |
|||
|
|||
public IdentityLinkUser(Guid id, Guid sourceUserId, Guid? sourceTenantId, Guid targetUserId, Guid? targetTenantId) |
|||
: base(id) |
|||
{ |
|||
SourceUserId = sourceUserId; |
|||
SourceTenantId = sourceTenantId; |
|||
public IdentityLinkUser(Guid id, Guid sourceUserId, Guid? sourceTenantId, Guid targetUserId, Guid? targetTenantId) |
|||
: base(id) |
|||
{ |
|||
SourceUserId = sourceUserId; |
|||
SourceTenantId = sourceTenantId; |
|||
|
|||
TargetUserId = targetUserId; |
|||
TargetTenantId = targetTenantId; |
|||
} |
|||
TargetUserId = targetUserId; |
|||
TargetTenantId = targetTenantId; |
|||
} |
|||
} |
|||
|
|||
@ -1,17 +1,16 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
namespace Volo.Abp.Identity; |
|||
|
|||
public class IdentityLinkUserInfo |
|||
{ |
|||
public class IdentityLinkUserInfo |
|||
{ |
|||
public virtual Guid UserId { get; set; } |
|||
public virtual Guid UserId { get; set; } |
|||
|
|||
public virtual Guid? TenantId { get; set; } |
|||
public virtual Guid? TenantId { get; set; } |
|||
|
|||
public IdentityLinkUserInfo(Guid userId, Guid? tenantId) |
|||
{ |
|||
UserId = userId; |
|||
TenantId = tenantId; |
|||
} |
|||
public IdentityLinkUserInfo(Guid userId, Guid? tenantId) |
|||
{ |
|||
UserId = userId; |
|||
TenantId = tenantId; |
|||
} |
|||
} |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue