diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs new file mode 100644 index 0000000000..1130b0bc92 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs @@ -0,0 +1,20 @@ +using System; +using JetBrains.Annotations; + +namespace Volo.Abp.IdentityServer.ApiResources +{ + [Serializable] + public class ApiResourceEto + { + public Guid Id { get; set; } + + [NotNull] + public string Name { get; set; } + + public string DisplayName { get; set; } + + public string Description { get; set; } + + public bool Enabled { get; set; } + } +} \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientEto.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientEto.cs new file mode 100644 index 0000000000..e5957eef5a --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientEto.cs @@ -0,0 +1,84 @@ +using System; + +namespace Volo.Abp.IdentityServer.Clients +{ + [Serializable] + public class ClientEto + { + public Guid Id { get; set; } + + public string ClientId { get; set; } + + public string ClientName { get; set; } + + public string Description { get; set; } + + public string ClientUri { get; set; } + + public string LogoUri { get; set; } + + public bool Enabled { get; set; } = true; + + public string ProtocolType { get; set; } + + public bool RequireClientSecret { get; set; } + + public bool RequireConsent { get; set; } + + public bool AllowRememberConsent { get; set; } + + public bool AlwaysIncludeUserClaimsInIdToken { get; set; } + + public bool RequirePkce { get; set; } + + public bool AllowPlainTextPkce { get; set; } + + public bool AllowAccessTokensViaBrowser { get; set; } + + public string FrontChannelLogoutUri { get; set; } + + public bool FrontChannelLogoutSessionRequired { get; set; } + + public string BackChannelLogoutUri { get; set; } + + public bool BackChannelLogoutSessionRequired { get; set; } + + public bool AllowOfflineAccess { get; set; } + + public int IdentityTokenLifetime { get; set; } + + public int AccessTokenLifetime { get; set; } + + public int AuthorizationCodeLifetime { get; set; } + + public int? ConsentLifetime { get; set; } + + public int AbsoluteRefreshTokenLifetime { get; set; } + + public int SlidingRefreshTokenLifetime { get; set; } + + public int RefreshTokenUsage { get; set; } + + public bool UpdateAccessTokenClaimsOnRefresh { get; set; } + + public int RefreshTokenExpiration { get; set; } + + public int AccessTokenType { get; set; } + + public bool EnableLocalLogin { get; set; } + + public bool IncludeJwtId { get; set; } + + public bool AlwaysSendClientClaims { get; set; } + + public string ClientClaimsPrefix { get; set; } + + public string PairWiseSubjectSalt { get; set; } + + public int? UserSsoLifetime { get; set; } + + public string UserCodeType { get; set; } + + public int DeviceCodeLifetime { get; set; } + } +} \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs new file mode 100644 index 0000000000..f82af68bbf --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs @@ -0,0 +1,22 @@ +using System; + +namespace Volo.Abp.IdentityServer.Devices +{ + [Serializable] + public class DeviceFlowCodesEto + { + public Guid Id { get; set; } + + public string DeviceCode { get; set; } + + public string UserCode { get; set; } + + public string SubjectId { get; set; } + + public string ClientId { get; set; } + + public DateTime? Expiration { get; set; } + + public string Data { get; set; } + } +} \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantEto.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantEto.cs new file mode 100644 index 0000000000..9d5db878f7 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantEto.cs @@ -0,0 +1,24 @@ +using System; + +namespace Volo.Abp.IdentityServer.Grants +{ + [Serializable] + public class PersistedGrantEto + { + public Guid Id { get; set; } + + public string Key { get; set; } + + public string Type { get; set; } + + public string SubjectId { get; set; } + + public string ClientId { get; set; } + + public DateTime CreationTime { get; set; } + + public DateTime? Expiration { get; set; } + + public string Data { get; set; } + } +} \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceEto.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceEto.cs new file mode 100644 index 0000000000..c382642a9f --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceEto.cs @@ -0,0 +1,24 @@ +using System; + +namespace Volo.Abp.IdentityServer.IdentityResources +{ + [Serializable] + public class IdentityResourceEto + { + public Guid Id { get; set; } + + public string Name { get; set; } + + public string DisplayName { get; set; } + + public string Description { get; set; } + + public bool Enabled { get; set; } + + public bool Required { get; set; } + + public bool Emphasize { get; set; } + + public bool ShowInDiscoveryDocument { get; set; } + } +} \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs index 0ff798e7fd..ef1969fe24 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs @@ -6,7 +6,13 @@ using Microsoft.Extensions.Options; using Volo.Abp.AutoMapper; using Volo.Abp.BackgroundWorkers; using Volo.Abp.Caching; +using Volo.Abp.EventBus.Distributed; using Volo.Abp.Identity; +using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.Clients; +using Volo.Abp.IdentityServer.Devices; +using Volo.Abp.IdentityServer.Grants; +using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.IdentityServer.Tokens; using Volo.Abp.Modularity; using Volo.Abp.Security; @@ -34,6 +40,14 @@ namespace Volo.Abp.IdentityServer options.AddProfile(validate: true); }); + Configure(options => + { + options.EtoMappings.Add(typeof(AbpIdentityServerDomainModule)); + options.EtoMappings.Add(typeof(AbpIdentityServerDomainModule)); + options.EtoMappings.Add(typeof(AbpIdentityServerDomainModule)); + options.EtoMappings.Add(typeof(AbpIdentityServerDomainModule)); + }); + AddIdentityServer(context.Services); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs index ba1f44953c..e576d9413e 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerAutoMapperProfile.cs @@ -3,6 +3,7 @@ using System.Security.Claims; using AutoMapper; using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.Clients; +using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; @@ -82,6 +83,12 @@ namespace Volo.Abp.IdentityServer CreateMap(MemberList.Destination) .ForMember(dest => dest.Type, opt => opt.Condition(srs => srs != null)) .ReverseMap(); + + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); } } }