Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identity ETO's added #3210

Merged
merged 9 commits into from Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,26 @@
using System;

namespace Volo.Abp.Identity
{
[Serializable]
public class IdentityClaimTypeEto
{
public Guid Id { get; set; }

public Guid? TenantId { get; set; }

public virtual string Name { get; set; }
cotur marked this conversation as resolved.
Show resolved Hide resolved

public virtual bool Required { get; set; }

public virtual bool IsStatic { get; set; }

public virtual string Regex { get; set; }

public virtual string RegexDescription { get; set; }

public virtual string Description { get; set; }

public virtual IdentityClaimValueType ValueType { get; set; }
}
}
@@ -0,0 +1,22 @@
using System;

namespace Volo.Abp.Identity
{
[Serializable]
public class IdentityRoleEto
{
public Guid Id { get; set; }

public Guid? TenantId { get; set; }

public virtual string Name { get; set; }

public virtual string NormalizedName { get; set; }

public virtual bool IsDefault { get; set; }

public virtual bool IsStatic { get; set; }

public virtual bool IsPublic { get; set; }
}
}
Expand Up @@ -25,6 +25,7 @@

<ProjectReference Include="..\..\..\users\src\Volo.Abp.Users.Domain\Volo.Abp.Users.Domain.csproj" />

<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Ddd.Domain\Volo.Abp.Ddd.Domain.csproj" />
</ItemGroup>

Expand Down
Expand Up @@ -2,6 +2,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using Volo.Abp.AutoMapper;
using Volo.Abp.Domain;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Modularity;
Expand All @@ -21,6 +22,13 @@ public override void ConfigureServices(ServiceConfigurationContext context)
Configure<AbpDistributedEventBusOptions>(options =>
{
options.EtoMappings.Add<IdentityUser, UserEto>();
options.EtoMappings.Add<IdentityClaimType, IdentityClaimTypeEto>();
options.EtoMappings.Add<IdentityRole, IdentityRoleEto>();
});

Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<IdentityDomainMappingProfile>(validate: true);
});

var identityBuilder = context.Services.AddAbpIdentity(options =>
Expand Down
@@ -0,0 +1,13 @@
using AutoMapper;

namespace Volo.Abp.Identity
{
public class IdentityDomainMappingProfile : Profile
{
public IdentityDomainMappingProfile()
{
CreateMap<IdentityClaimType, IdentityClaimTypeEto>();
CreateMap<IdentityRoleEto, IdentityRoleEto>();
cotur marked this conversation as resolved.
Show resolved Hide resolved
}
}
}