diff --git a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityRoleClaim.cs b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityRoleClaim.cs index 726e4b35fd..f214cd5cb7 100644 --- a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityRoleClaim.cs +++ b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityRoleClaim.cs @@ -33,13 +33,13 @@ namespace Volo.Abp.Identity } - public IdentityRoleClaim(Guid id, Guid roleId, [NotNull] Claim claim) + protected internal IdentityRoleClaim(Guid id, Guid roleId, [NotNull] Claim claim) : this(id, roleId, claim.Type, claim.Value) { } - public IdentityRoleClaim(Guid id, Guid roleId, [NotNull] string claimType, string claimValue) + protected internal IdentityRoleClaim(Guid id, Guid roleId, [NotNull] string claimType, string claimValue) { Check.NotNull(claimType, nameof(claimType)); diff --git a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserClaim.cs b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserClaim.cs index b40b736443..a8f8217956 100644 --- a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserClaim.cs +++ b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserClaim.cs @@ -33,13 +33,13 @@ namespace Volo.Abp.Identity } - public IdentityUserClaim(Guid id, Guid userId, [NotNull] Claim claim) + protected internal IdentityUserClaim(Guid id, Guid userId, [NotNull] Claim claim) : this(id, userId, claim.Type, claim.Value) { } - public IdentityUserClaim(Guid id, Guid userId, [NotNull] string claimType, string claimValue) + protected internal IdentityUserClaim(Guid id, Guid userId, [NotNull] string claimType, string claimValue) { Check.NotNull(claimType, nameof(claimType)); diff --git a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserLogin.cs b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserLogin.cs index aa897f87b8..cf37d39642 100644 --- a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserLogin.cs +++ b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserLogin.cs @@ -5,8 +5,6 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.Identity { - //TODO: Make constructors internal to ensure that it's called by only from IdentityUser? - /// /// Represents a login and its associated provider for a user. /// @@ -41,7 +39,7 @@ namespace Volo.Abp.Identity } - public IdentityUserLogin(Guid id, Guid userId, [NotNull] string loginProvider, [NotNull] string providerKey, string providerDisplayName) + protected internal IdentityUserLogin(Guid id, Guid userId, [NotNull] string loginProvider, [NotNull] string providerKey, string providerDisplayName) { Check.NotNull(loginProvider, nameof(loginProvider)); Check.NotNull(providerKey, nameof(providerKey)); diff --git a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserRole.cs b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserRole.cs index d993b5e5bf..1867ec582e 100644 --- a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserRole.cs +++ b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserRole.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.Identity } - public IdentityUserRole(Guid id, Guid userId, Guid roleId) + protected internal IdentityUserRole(Guid id, Guid userId, Guid roleId) { Id = id; UserId = userId; diff --git a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserToken.cs b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserToken.cs index 5d9005ec7b..4f67b0161c 100644 --- a/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserToken.cs +++ b/src/Volo.Abp.Identity/Volo/Abp/Identity/IdentityUserToken.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.Identity } - public IdentityUserToken(Guid id, Guid userId, [NotNull] string loginProvider, [NotNull] string name, string value) + protected internal IdentityUserToken(Guid id, Guid userId, [NotNull] string loginProvider, [NotNull] string name, string value) { Check.NotNull(loginProvider, nameof(loginProvider)); Check.NotNull(name, nameof(name));