committed by
GitHub
721 changed files with 52340 additions and 33374 deletions
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
File diff suppressed because it is too large
@ -0,0 +1,77 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
public partial class AddGdprModule : Migration |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpGdprRequests", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
ReadyTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpGdprRequests", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpGdprInfos", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
RequestId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Data = table.Column<string>(type: "longtext", nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Provider = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpGdprInfos", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpGdprInfos_AbpGdprRequests_RequestId", |
||||
|
column: x => x.RequestId, |
||||
|
principalTable: "AbpGdprRequests", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpGdprInfos_RequestId", |
||||
|
table: "AbpGdprInfos", |
||||
|
column: "RequestId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpGdprRequests_UserId", |
||||
|
table: "AbpGdprRequests", |
||||
|
column: "UserId"); |
||||
|
} |
||||
|
|
||||
|
/// <inheritdoc />
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpGdprInfos"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpGdprRequests"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,77 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace LY.MicroService.IdentityServer.EntityFrameworkCore.Migrations |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
public partial class AddGdprModule : Migration |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpGdprRequests", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
ReadyTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpGdprRequests", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpGdprInfos", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
RequestId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Data = table.Column<string>(type: "longtext", nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Provider = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpGdprInfos", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpGdprInfos_AbpGdprRequests_RequestId", |
||||
|
column: x => x.RequestId, |
||||
|
principalTable: "AbpGdprRequests", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpGdprInfos_RequestId", |
||||
|
table: "AbpGdprInfos", |
||||
|
column: "RequestId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpGdprRequests_UserId", |
||||
|
table: "AbpGdprRequests", |
||||
|
column: "UserId"); |
||||
|
} |
||||
|
|
||||
|
/// <inheritdoc />
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpGdprInfos"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpGdprRequests"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,170 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Metadata; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
public partial class AddMessageCenter : Migration |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppPlatformEmailMessages", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
From = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Subject = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
IsBodyHtml = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
CC = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Normalize = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
Priority = table.Column<int>(type: "int", nullable: true), |
||||
|
BodyTransferEncoding = table.Column<int>(type: "int", nullable: true), |
||||
|
DeliveryNotificationOptions = table.Column<int>(type: "int", nullable: true), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
Sender = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Provider = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Receiver = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Content = table.Column<string>(type: "longtext", nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
SendTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
SendCount = table.Column<int>(type: "int", nullable: false), |
||||
|
Status = table.Column<int>(type: "int", nullable: false), |
||||
|
Reason = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppPlatformEmailMessages", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppPlatformSmsMessages", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
Sender = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Provider = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Receiver = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Content = table.Column<string>(type: "longtext", nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
SendTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
SendCount = table.Column<int>(type: "int", nullable: false), |
||||
|
Status = table.Column<int>(type: "int", nullable: false), |
||||
|
Reason = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppPlatformSmsMessages", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppPlatformEmailMessageAttachments", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
MessageId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
BlobName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Size = table.Column<long>(type: "bigint", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppPlatformEmailMessageAttachments", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AppPlatformEmailMessageAttachments_AppPlatformEmailMessages_~", |
||||
|
column: x => x.MessageId, |
||||
|
principalTable: "AppPlatformEmailMessages", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppPlatformEmailMessageHeaders", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
MessageId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Key = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Value = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppPlatformEmailMessageHeaders", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AppPlatformEmailMessageHeaders_AppPlatformEmailMessages_Mess~", |
||||
|
column: x => x.MessageId, |
||||
|
principalTable: "AppPlatformEmailMessages", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppPlatformEmailMessageAttachments_MessageId", |
||||
|
table: "AppPlatformEmailMessageAttachments", |
||||
|
column: "MessageId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppPlatformEmailMessageHeaders_MessageId", |
||||
|
table: "AppPlatformEmailMessageHeaders", |
||||
|
column: "MessageId"); |
||||
|
} |
||||
|
|
||||
|
/// <inheritdoc />
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppPlatformEmailMessageAttachments"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppPlatformEmailMessageHeaders"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppPlatformSmsMessages"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppPlatformEmailMessages"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public class GetUserClaimStateDto |
||||
|
{ |
||||
|
public bool IsBound { get; set; } |
||||
|
public string Value { get; set; } |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public class SecurityLogDto : ExtensibleEntityDto<Guid> |
||||
|
{ |
||||
|
public string ApplicationName { get; set; } |
||||
|
|
||||
|
public string Identity { get; set; } |
||||
|
|
||||
|
public string Action { get; set; } |
||||
|
|
||||
|
public Guid? UserId { get; set; } |
||||
|
|
||||
|
public string UserName { get; set; } |
||||
|
|
||||
|
public string TenantName { get; set; } |
||||
|
|
||||
|
public string ClientId { get; set; } |
||||
|
|
||||
|
public string CorrelationId { get; set; } |
||||
|
|
||||
|
public string ClientIpAddress { get; set; } |
||||
|
|
||||
|
public string BrowserInfo { get; set; } |
||||
|
|
||||
|
public DateTime CreationTime { get; set; } |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public class SecurityLogGetListInput : PagedAndSortedResultRequestDto |
||||
|
{ |
||||
|
public DateTime? StartTime { get; set; } |
||||
|
public DateTime? EndTime { get; set; } |
||||
|
public string ApplicationName { get; set; } |
||||
|
public string Identity { get; set; } |
||||
|
public string ActionName { get; set; } |
||||
|
public string ClientId { get; set; } |
||||
|
public string CorrelationId { get; set; } |
||||
|
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public interface IMySecurityLogAppService |
||||
|
{ |
||||
|
Task<PagedResultDto<SecurityLogDto>> GetListAsync(SecurityLogGetListInput input); |
||||
|
|
||||
|
Task<SecurityLogDto> GetAsync(Guid id); |
||||
|
|
||||
|
Task DeleteAsync(Guid id); |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
using AutoMapper; |
||||
|
using LINGYUN.Abp.AuditLogging; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public class AbpAccountMapperProfile : Profile |
||||
|
{ |
||||
|
public AbpAccountMapperProfile() |
||||
|
{ |
||||
|
CreateMap<SecurityLog, SecurityLogDto>(MemberList.Destination); |
||||
|
} |
||||
|
} |
||||
@ -1,92 +0,0 @@ |
|||||
using LINGYUN.Abp.Account.Emailing.Templates; |
|
||||
using Microsoft.Extensions.Localization; |
|
||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Diagnostics; |
|
||||
using System.Text.Encodings.Web; |
|
||||
using System.Threading.Tasks; |
|
||||
using Volo.Abp.Account.Emailing; |
|
||||
using Volo.Abp.Account.Localization; |
|
||||
using Volo.Abp.DependencyInjection; |
|
||||
using Volo.Abp.Emailing; |
|
||||
using Volo.Abp.Identity; |
|
||||
using Volo.Abp.MultiTenancy; |
|
||||
using Volo.Abp.TextTemplating; |
|
||||
using Volo.Abp.UI.Navigation.Urls; |
|
||||
|
|
||||
namespace LINGYUN.Abp.Account.Emailing; |
|
||||
|
|
||||
[Dependency(ReplaceServices = true)] |
|
||||
[ExposeServices( |
|
||||
typeof(IAccountEmailConfirmSender), |
|
||||
typeof(IAccountEmailVerifySender), |
|
||||
typeof(IAccountEmailer), |
|
||||
typeof(AccountEmailSender))] |
|
||||
public class AccountEmailSender : |
|
||||
AccountEmailer, |
|
||||
IAccountEmailConfirmSender, |
|
||||
IAccountEmailVerifySender, |
|
||||
ITransientDependency |
|
||||
{ |
|
||||
public AccountEmailSender( |
|
||||
IEmailSender emailSender, |
|
||||
ITemplateRenderer templateRenderer, |
|
||||
IStringLocalizer<AccountResource> accountLocalizer, |
|
||||
IAppUrlProvider appUrlProvider, |
|
||||
ICurrentTenant currentTenant) |
|
||||
: base(emailSender, templateRenderer, accountLocalizer, appUrlProvider, currentTenant) |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
public async virtual Task SendMailLoginVerifyCodeAsync( |
|
||||
string code, |
|
||||
string userName, |
|
||||
string emailAddress) |
|
||||
{ |
|
||||
var emailContent = await TemplateRenderer.RenderAsync( |
|
||||
AccountEmailTemplates.MailSecurityVerifyLink, |
|
||||
new { code = code, user = userName } |
|
||||
); |
|
||||
|
|
||||
await EmailSender.SendAsync( |
|
||||
emailAddress, |
|
||||
StringLocalizer["MailSecurityVerify"], |
|
||||
emailContent |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
public async virtual Task SendEmailConfirmLinkAsync( |
|
||||
IdentityUser user, |
|
||||
string confirmToken, |
|
||||
string appName, |
|
||||
string returnUrl = null, |
|
||||
string returnUrlHash = null) |
|
||||
{ |
|
||||
Debug.Assert(CurrentTenant.Id == user.TenantId, "This method can only work for current tenant!"); |
|
||||
|
|
||||
var url = await AppUrlProvider.GetUrlAsync(appName, AccountUrlNames.EmailConfirm); |
|
||||
|
|
||||
var link = $"{url}?userId={user.Id}&{TenantResolverConsts.DefaultTenantKey}={user.TenantId}&confirmToken={confirmToken}"; |
|
||||
|
|
||||
if (!returnUrl.IsNullOrEmpty()) |
|
||||
{ |
|
||||
link += "&returnUrl=" + NormalizeReturnUrl(returnUrl); |
|
||||
} |
|
||||
|
|
||||
if (!returnUrlHash.IsNullOrEmpty()) |
|
||||
{ |
|
||||
link += "&returnUrlHash=" + returnUrlHash; |
|
||||
} |
|
||||
|
|
||||
var emailContent = await TemplateRenderer.RenderAsync( |
|
||||
AccountEmailTemplates.MailConfirmLink, |
|
||||
new { link = link } |
|
||||
); |
|
||||
|
|
||||
await EmailSender.SendAsync( |
|
||||
user.Email, |
|
||||
StringLocalizer["EmailConfirm"], |
|
||||
emailContent |
|
||||
); |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,51 @@ |
|||||
|
using LINGYUN.Abp.AuditLogging; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.Users; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
[Authorize] |
||||
|
public class MySecurityLogAppService : AccountApplicationServiceBase, IMySecurityLogAppService |
||||
|
{ |
||||
|
protected ISecurityLogManager SecurityLogManager { get; } |
||||
|
public MySecurityLogAppService(ISecurityLogManager securityLogManager) |
||||
|
{ |
||||
|
SecurityLogManager = securityLogManager; |
||||
|
} |
||||
|
public async virtual Task<SecurityLogDto> GetAsync(Guid id) |
||||
|
{ |
||||
|
var securityLog = await SecurityLogManager.GetAsync(id, includeDetails: true); |
||||
|
|
||||
|
return ObjectMapper.Map<SecurityLog, SecurityLogDto>(securityLog); |
||||
|
} |
||||
|
|
||||
|
public async virtual Task<PagedResultDto<SecurityLogDto>> GetListAsync(SecurityLogGetListInput input) |
||||
|
{ |
||||
|
var userId = CurrentUser.GetId(); |
||||
|
var securityLogCount = await SecurityLogManager |
||||
|
.GetCountAsync(input.StartTime, input.EndTime, |
||||
|
input.ApplicationName, input.Identity, input.ActionName, |
||||
|
userId, null, input.ClientId, input.CorrelationId |
||||
|
); |
||||
|
|
||||
|
var securityLogs = await SecurityLogManager |
||||
|
.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, |
||||
|
input.StartTime, input.EndTime, |
||||
|
input.ApplicationName, input.Identity, input.ActionName, |
||||
|
userId, null, input.ClientId, input.CorrelationId, |
||||
|
includeDetails: false |
||||
|
); |
||||
|
|
||||
|
return new PagedResultDto<SecurityLogDto>(securityLogCount, |
||||
|
ObjectMapper.Map<List<SecurityLog>, List<SecurityLogDto>>(securityLogs)); |
||||
|
} |
||||
|
|
||||
|
public async virtual Task DeleteAsync(Guid id) |
||||
|
{ |
||||
|
await SecurityLogManager.DeleteAsync(id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
||||
|
<xs:element name="Weavers"> |
||||
|
<xs:complexType> |
||||
|
<xs:all> |
||||
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
||||
|
<xs:complexType> |
||||
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:all> |
||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:schema> |
||||
@ -0,0 +1,28 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<Import Project="..\..\..\..\configureawait.props" /> |
||||
|
<Import Project="..\..\..\..\common.props" /> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks> |
||||
|
<AssemblyName>LINGYUN.Abp.Account.Emailing</AssemblyName> |
||||
|
<PackageId>LINGYUN.Abp.Account.Emailing</PackageId> |
||||
|
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> |
||||
|
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> |
||||
|
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> |
||||
|
<RootNamespace /> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<None Remove="LINGYUN\Abp\Account\Emailing\Templates\*.tpl" /> |
||||
|
<None Remove="LINGYUN\Abp\Account\Emailing\Localization\Resources\*.json" /> |
||||
|
<EmbeddedResource Include="LINGYUN\Abp\Account\Emailing\Templates\*.tpl" /> |
||||
|
<EmbeddedResource Include="LINGYUN\Abp\Account\Emailing\Localization\Resources\*.json" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Volo.Abp.Emailing" /> |
||||
|
<PackageReference Include="Volo.Abp.UI.Navigation" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
@ -0,0 +1,29 @@ |
|||||
|
using LINGYUN.Abp.Account.Emailing.Localization; |
||||
|
using Volo.Abp.Emailing; |
||||
|
using Volo.Abp.Localization; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.UI.Navigation; |
||||
|
using Volo.Abp.VirtualFileSystem; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account.Emailing; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(AbpEmailingModule), |
||||
|
typeof(AbpUiNavigationModule))] |
||||
|
public class AbpAccountEmailingModule : AbpModule |
||||
|
{ |
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
Configure<AbpVirtualFileSystemOptions>(options => |
||||
|
{ |
||||
|
options.FileSets.AddEmbedded<AbpAccountEmailingModule>(); |
||||
|
}); |
||||
|
|
||||
|
Configure<AbpLocalizationOptions>(options => |
||||
|
{ |
||||
|
options.Resources |
||||
|
.Add<AccountEmailingResource>("en") |
||||
|
.AddVirtualJson("/LINGYUN/Abp/Account/Emailing/Localization/Resources"); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,137 @@ |
|||||
|
using LINGYUN.Abp.Account.Emailing.Localization; |
||||
|
using LINGYUN.Abp.Account.Emailing.Templates; |
||||
|
using Microsoft.Extensions.Localization; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Diagnostics; |
||||
|
using System.Text.Encodings.Web; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.Web; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Emailing; |
||||
|
using Volo.Abp.MultiTenancy; |
||||
|
using Volo.Abp.TextTemplating; |
||||
|
using Volo.Abp.UI.Navigation.Urls; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account.Emailing; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices( |
||||
|
typeof(IAccountEmailConfirmSender), |
||||
|
typeof(IAccountEmailVerifySender), |
||||
|
typeof(AccountEmailSender))] |
||||
|
public class AccountEmailSender : |
||||
|
IAccountEmailConfirmSender, |
||||
|
IAccountEmailVerifySender, |
||||
|
ITransientDependency |
||||
|
{ |
||||
|
protected ITemplateRenderer TemplateRenderer { get; } |
||||
|
protected IEmailSender EmailSender { get; } |
||||
|
protected IStringLocalizer<AccountEmailingResource> StringLocalizer { get; } |
||||
|
protected IAppUrlProvider AppUrlProvider { get; } |
||||
|
protected ICurrentTenant CurrentTenant { get; } |
||||
|
|
||||
|
public AccountEmailSender( |
||||
|
IEmailSender emailSender, |
||||
|
ICurrentTenant currentTenant, |
||||
|
IAppUrlProvider appUrlProvider, |
||||
|
ITemplateRenderer templateRenderer, |
||||
|
IStringLocalizer<AccountEmailingResource> accountLocalizer) |
||||
|
{ |
||||
|
EmailSender = emailSender; |
||||
|
CurrentTenant = currentTenant; |
||||
|
AppUrlProvider = appUrlProvider; |
||||
|
StringLocalizer = accountLocalizer; |
||||
|
TemplateRenderer = templateRenderer; |
||||
|
} |
||||
|
|
||||
|
public async virtual Task SendMailLoginVerifyCodeAsync( |
||||
|
string code, |
||||
|
string userName, |
||||
|
string emailAddress) |
||||
|
{ |
||||
|
var emailContent = await TemplateRenderer.RenderAsync( |
||||
|
AccountEmailTemplates.MailSecurityVerifyLink, |
||||
|
new { code = code, user = userName } |
||||
|
); |
||||
|
|
||||
|
await EmailSender.SendAsync( |
||||
|
emailAddress, |
||||
|
StringLocalizer["MailSecurityVerify"], |
||||
|
emailContent |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
public async virtual Task SendEmailConfirmLinkAsync( |
||||
|
Guid userId, |
||||
|
string userEmail, |
||||
|
string confirmToken, |
||||
|
string appName, |
||||
|
string returnUrl = null, |
||||
|
string returnUrlHash = null, |
||||
|
Guid? userTenantId = null) |
||||
|
{ |
||||
|
Debug.Assert(CurrentTenant.Id == userTenantId, "This method can only work for current tenant!"); |
||||
|
|
||||
|
var url = await AppUrlProvider.GetUrlAsync(appName, AccountUrlNames.EmailConfirm); |
||||
|
|
||||
|
var link = $"{url}?userId={userId}&{TenantResolverConsts.DefaultTenantKey}={userTenantId}&confirmToken={UrlEncoder.Default.Encode(confirmToken)}"; |
||||
|
|
||||
|
if (!returnUrl.IsNullOrEmpty()) |
||||
|
{ |
||||
|
link += "&returnUrl=" + NormalizeReturnUrl(returnUrl); |
||||
|
} |
||||
|
|
||||
|
if (!returnUrlHash.IsNullOrEmpty()) |
||||
|
{ |
||||
|
link += "&returnUrlHash=" + returnUrlHash; |
||||
|
} |
||||
|
|
||||
|
var emailContent = await TemplateRenderer.RenderAsync( |
||||
|
AccountEmailTemplates.MailConfirmLink, |
||||
|
new { link = link } |
||||
|
); |
||||
|
|
||||
|
await EmailSender.SendAsync( |
||||
|
userEmail, |
||||
|
StringLocalizer["EmailConfirm"], |
||||
|
emailContent |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
protected virtual string NormalizeReturnUrl(string returnUrl) |
||||
|
{ |
||||
|
if (returnUrl.IsNullOrEmpty()) |
||||
|
{ |
||||
|
return returnUrl; |
||||
|
} |
||||
|
|
||||
|
//Handling openid connect login
|
||||
|
if (returnUrl.StartsWith("/connect/authorize/callback", StringComparison.OrdinalIgnoreCase)) |
||||
|
{ |
||||
|
if (returnUrl.Contains("?")) |
||||
|
{ |
||||
|
var queryPart = returnUrl.Split('?')[1]; |
||||
|
var queryParameters = queryPart.Split('&'); |
||||
|
foreach (var queryParameter in queryParameters) |
||||
|
{ |
||||
|
if (queryParameter.Contains("=")) |
||||
|
{ |
||||
|
var queryParam = queryParameter.Split('='); |
||||
|
if (queryParam[0] == "redirect_uri") |
||||
|
{ |
||||
|
return HttpUtility.UrlDecode(queryParam[1]); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (returnUrl.StartsWith("/connect/authorize?", StringComparison.OrdinalIgnoreCase)) |
||||
|
{ |
||||
|
return HttpUtility.UrlEncode(returnUrl); |
||||
|
} |
||||
|
|
||||
|
return returnUrl; |
||||
|
} |
||||
|
} |
||||
@ -1,7 +1,7 @@ |
|||||
namespace LINGYUN.Abp.Account; |
namespace LINGYUN.Abp.Account.Emailing; |
||||
|
|
||||
public static class AccountUrlNames |
public static class AccountUrlNames |
||||
{ |
{ |
||||
public const string EmailConfirm = "Abp.Account.EmailConfirm"; |
public const string EmailConfirm = "Abp.Account.EmailConfirm"; |
||||
public const string EmailVerifyLogin = "Abp.Account.EmailVerifyLogin"; |
public const string EmailVerifyLogin = "Abp.Account.EmailVerifyLogin"; |
||||
} |
} |
||||
@ -1,15 +1,17 @@ |
|||||
using System.Threading.Tasks; |
using System; |
||||
using Volo.Abp.Identity; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace LINGYUN.Abp.Account.Emailing; |
namespace LINGYUN.Abp.Account.Emailing; |
||||
|
|
||||
public interface IAccountEmailConfirmSender |
public interface IAccountEmailConfirmSender |
||||
{ |
{ |
||||
Task SendEmailConfirmLinkAsync( |
Task SendEmailConfirmLinkAsync( |
||||
IdentityUser user, |
Guid userId, |
||||
string confirmToken, |
string userEmail, |
||||
string appName, |
string confirmToken, |
||||
string returnUrl = null, |
string appName, |
||||
string returnUrlHash = null |
string returnUrl = null, |
||||
); |
string returnUrlHash = null, |
||||
} |
Guid? userTenantId = null |
||||
|
); |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
using Volo.Abp.Localization; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account.Emailing.Localization; |
||||
|
|
||||
|
[LocalizationResourceName("AbpAccountEmailing")] |
||||
|
public class AccountEmailingResource |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
namespace LINGYUN.Abp.Account.Emailing.Templates; |
||||
|
|
||||
|
public static class AccountEmailTemplates |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 邮件地址确认
|
||||
|
/// </summary>
|
||||
|
public const string MailConfirmLink = "Abp.Account.MailConfirmLink"; |
||||
|
/// <summary>
|
||||
|
/// 邮件安全验证
|
||||
|
/// </summary>
|
||||
|
public const string MailSecurityVerifyLink = "Abp.Account.MailSecurityVerifyLink"; |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
using LINGYUN.Abp.Account.Emailing.Localization; |
||||
|
using Volo.Abp.Emailing.Templates; |
||||
|
using Volo.Abp.Localization; |
||||
|
using Volo.Abp.TextTemplating; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Account.Emailing.Templates; |
||||
|
|
||||
|
public class AccountTemplateDefinitionProvider : TemplateDefinitionProvider |
||||
|
{ |
||||
|
public override void Define(ITemplateDefinitionContext context) |
||||
|
{ |
||||
|
context.Add( |
||||
|
new TemplateDefinition( |
||||
|
AccountEmailTemplates.MailSecurityVerifyLink, |
||||
|
displayName: L($"TextTemplate:{AccountEmailTemplates.MailSecurityVerifyLink}"), |
||||
|
layout: StandardEmailTemplates.Layout, |
||||
|
localizationResource: typeof(AccountEmailingResource) |
||||
|
).WithVirtualFilePath("/LINGYUN/Abp/Account/Emailing/Templates/MailSecurityVerify.tpl", true), |
||||
|
new TemplateDefinition( |
||||
|
AccountEmailTemplates.MailConfirmLink, |
||||
|
displayName: L($"TextTemplate:{AccountEmailTemplates.MailConfirmLink}"), |
||||
|
layout: StandardEmailTemplates.Layout, |
||||
|
localizationResource: typeof(AccountEmailingResource) |
||||
|
).WithVirtualFilePath("/LINGYUN/Abp/Account/Emailing/Templates/MailConfirm.tpl", true) |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
private static ILocalizableString L(string name) |
||||
|
{ |
||||
|
return LocalizableString.Create<AccountEmailingResource>(name); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
<h3>{{L "EmailConfirm"}}</h3> |
||||
|
|
||||
|
<p>{{L "EmailConfirmInfo"}}</p> |
||||
|
|
||||
|
<div> |
||||
|
<a href="{{model.link}}">{{L "ConfirmMyEmail"}}</a> |
||||
|
</div> |
||||
@ -0,0 +1,5 @@ |
|||||
|
<div style="position: absolute;"> |
||||
|
<span>{{L "VerifyMyEmailAddress"}}{{model.user}}</span> |
||||
|
<p style="display:block; padding:0 50px; width: 150px; height:48px; line-height:48px; color:#cc0000; font-size:26px; background:#9c9797; font-weight:bold;">{{model.code}}</p> |
||||
|
<span>{{L "MailSecurityVerifyRemarks"}}</span> |
||||
|
</div> |
||||
@ -0,0 +1,83 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using LINGYUN.Abp.Account; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IAccountAppService), typeof(AccountClientProxy))] |
||||
|
public partial class AccountClientProxy : ClientProxyBase<IAccountAppService>, IAccountAppService |
||||
|
{ |
||||
|
public virtual async Task RegisterAsync(WeChatRegisterDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(RegisterAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(WeChatRegisterDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task RegisterAsync(PhoneRegisterDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(RegisterAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(PhoneRegisterDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task ResetPasswordAsync(PhoneResetPasswordDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(ResetPasswordAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(PhoneResetPasswordDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task SendPhoneSigninCodeAsync(SendPhoneSigninCodeDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(SendPhoneSigninCodeAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SendPhoneSigninCodeDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task SendEmailSigninCodeAsync(SendEmailSigninCodeDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(SendEmailSigninCodeAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SendEmailSigninCodeDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task SendPhoneRegisterCodeAsync(SendPhoneRegisterCodeDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(SendPhoneRegisterCodeAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SendPhoneRegisterCodeDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task SendPhoneResetPasswordCodeAsync(SendPhoneResetPasswordCodeDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(SendPhoneResetPasswordCodeAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SendPhoneResetPasswordCodeDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<ListResultDto<NameValue>> GetTwoFactorProvidersAsync(GetTwoFactorProvidersInput input) |
||||
|
{ |
||||
|
return await RequestAsync<ListResultDto<NameValue>>(nameof(GetTwoFactorProvidersAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(GetTwoFactorProvidersInput), input } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of AccountClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public partial class AccountClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using LINGYUN.Abp.Account; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IMyClaimAppService), typeof(MyClaimClientProxy))] |
||||
|
public partial class MyClaimClientProxy : ClientProxyBase<IMyClaimAppService>, IMyClaimAppService |
||||
|
{ |
||||
|
public virtual async Task ChangeAvatarAsync(ChangeAvatarInput input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(ChangeAvatarAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(ChangeAvatarInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<GetUserClaimStateDto> GetStateAsync(string claimType) |
||||
|
{ |
||||
|
return await RequestAsync<GetUserClaimStateDto>(nameof(GetStateAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(string), claimType } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task ResetAsync(string claimType) |
||||
|
{ |
||||
|
await RequestAsync(nameof(ResetAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(string), claimType } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of MyClaimClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public partial class MyClaimClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,99 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using LINGYUN.Abp.Account; |
||||
|
using LINGYUN.Abp.Identity; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IMyProfileAppService), typeof(MyProfileClientProxy))] |
||||
|
public partial class MyProfileClientProxy : ClientProxyBase<IMyProfileAppService>, IMyProfileAppService |
||||
|
{ |
||||
|
public virtual async Task<PagedResultDto<IdentitySessionDto>> GetSessionsAsync(GetMySessionsInput input) |
||||
|
{ |
||||
|
return await RequestAsync<PagedResultDto<IdentitySessionDto>>(nameof(GetSessionsAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(GetMySessionsInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task RevokeSessionAsync(string sessionId) |
||||
|
{ |
||||
|
await RequestAsync(nameof(RevokeSessionAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(string), sessionId } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<TwoFactorEnabledDto> GetTwoFactorEnabledAsync() |
||||
|
{ |
||||
|
return await RequestAsync<TwoFactorEnabledDto>(nameof(GetTwoFactorEnabledAsync)); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task ChangeTwoFactorEnabledAsync(TwoFactorEnabledDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(ChangeTwoFactorEnabledAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(TwoFactorEnabledDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task SendChangePhoneNumberCodeAsync(SendChangePhoneNumberCodeInput input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(SendChangePhoneNumberCodeAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SendChangePhoneNumberCodeInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task ChangePhoneNumberAsync(ChangePhoneNumberInput input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(ChangePhoneNumberAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(ChangePhoneNumberInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task SendEmailConfirmLinkAsync(SendEmailConfirmCodeDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(SendEmailConfirmLinkAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SendEmailConfirmCodeDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task ConfirmEmailAsync(ConfirmEmailInput input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(ConfirmEmailAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(ConfirmEmailInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<AuthenticatorDto> GetAuthenticatorAsync() |
||||
|
{ |
||||
|
return await RequestAsync<AuthenticatorDto>(nameof(GetAuthenticatorAsync)); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<AuthenticatorRecoveryCodeDto> VerifyAuthenticatorCodeAsync(VerifyAuthenticatorCodeInput input) |
||||
|
{ |
||||
|
return await RequestAsync<AuthenticatorRecoveryCodeDto>(nameof(VerifyAuthenticatorCodeAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(VerifyAuthenticatorCodeInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task ResetAuthenticatorAsync() |
||||
|
{ |
||||
|
await RequestAsync(nameof(ResetAuthenticatorAsync)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of MyProfileClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public partial class MyProfileClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using LINGYUN.Abp.Account; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IMySecurityLogAppService), typeof(MySecurityLogClientProxy))] |
||||
|
public partial class MySecurityLogClientProxy : ClientProxyBase<IMySecurityLogAppService>, IMySecurityLogAppService |
||||
|
{ |
||||
|
public virtual async Task DeleteAsync(Guid id) |
||||
|
{ |
||||
|
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(Guid), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<SecurityLogDto> GetAsync(Guid id) |
||||
|
{ |
||||
|
return await RequestAsync<SecurityLogDto>(nameof(GetAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(Guid), id } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<PagedResultDto<SecurityLogDto>> GetListAsync(SecurityLogGetListInput input) |
||||
|
{ |
||||
|
return await RequestAsync<PagedResultDto<SecurityLogDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SecurityLogGetListInput), input } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of MySecurityLogClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
|
public partial class MySecurityLogClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Account; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
using Volo.Abp.Identity; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace Volo.Abp.Account; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IAccountAppService), typeof(AccountClientProxy))] |
||||
|
public partial class AccountClientProxy : ClientProxyBase<IAccountAppService>, IAccountAppService |
||||
|
{ |
||||
|
public virtual async Task<IdentityUserDto> RegisterAsync(RegisterDto input) |
||||
|
{ |
||||
|
return await RequestAsync<IdentityUserDto>(nameof(RegisterAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(RegisterDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task SendPasswordResetCodeAsync(SendPasswordResetCodeDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(SendPasswordResetCodeAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(SendPasswordResetCodeDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<bool> VerifyPasswordResetTokenAsync(VerifyPasswordResetTokenInput input) |
||||
|
{ |
||||
|
return await RequestAsync<bool>(nameof(VerifyPasswordResetTokenAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(VerifyPasswordResetTokenInput), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task ResetPasswordAsync(ResetPasswordDto input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(ResetPasswordAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(ResetPasswordDto), input } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of AccountClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace Volo.Abp.Account; |
||||
|
|
||||
|
public partial class AccountClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Account; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace Volo.Abp.Account; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IDynamicClaimsAppService), typeof(DynamicClaimsClientProxy))] |
||||
|
public partial class DynamicClaimsClientProxy : ClientProxyBase<IDynamicClaimsAppService>, IDynamicClaimsAppService |
||||
|
{ |
||||
|
public virtual async Task RefreshAsync() |
||||
|
{ |
||||
|
await RequestAsync(nameof(RefreshAsync)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of DynamicClaimsClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace Volo.Abp.Account; |
||||
|
|
||||
|
public partial class DynamicClaimsClientProxy |
||||
|
{ |
||||
|
} |
||||
@ -0,0 +1,40 @@ |
|||||
|
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Account; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Http.Client; |
||||
|
using Volo.Abp.Http.Client.ClientProxying; |
||||
|
using Volo.Abp.Http.Modeling; |
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace Volo.Abp.Account; |
||||
|
|
||||
|
[Dependency(ReplaceServices = true)] |
||||
|
[ExposeServices(typeof(IProfileAppService), typeof(ProfileClientProxy))] |
||||
|
public partial class ProfileClientProxy : ClientProxyBase<IProfileAppService>, IProfileAppService |
||||
|
{ |
||||
|
public virtual async Task<ProfileDto> GetAsync() |
||||
|
{ |
||||
|
return await RequestAsync<ProfileDto>(nameof(GetAsync)); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<ProfileDto> UpdateAsync(UpdateProfileDto input) |
||||
|
{ |
||||
|
return await RequestAsync<ProfileDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(UpdateProfileDto), input } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task ChangePasswordAsync(ChangePasswordInput input) |
||||
|
{ |
||||
|
await RequestAsync(nameof(ChangePasswordAsync), new ClientProxyRequestTypeValue |
||||
|
{ |
||||
|
{ typeof(ChangePasswordInput), input } |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
// This file is part of ProfileClientProxy, you can customize it here
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
|
namespace Volo.Abp.Account; |
||||
|
|
||||
|
public partial class ProfileClientProxy |
||||
|
{ |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
||||
|
<xs:element name="Weavers"> |
||||
|
<xs:complexType> |
||||
|
<xs:all> |
||||
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
||||
|
<xs:complexType> |
||||
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:all> |
||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:schema> |
||||
@ -0,0 +1,32 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<Import Project="..\..\..\..\configureawait.props" /> |
||||
|
<Import Project="..\..\..\..\common.props" /> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks> |
||||
|
<AssemblyName>LINGYUN.Abp.Account.HttpApi.Client</AssemblyName> |
||||
|
<PackageId>LINGYUN.Abp.Account.HttpApi.Client</PackageId> |
||||
|
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> |
||||
|
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> |
||||
|
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> |
||||
|
<RootNamespace /> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<None Remove="ClientProxies\account-generate-proxy.json" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<EmbeddedResource Include="ClientProxies\account-generate-proxy.json" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\LINGYUN.Abp.Account.Application.Contracts\LINGYUN.Abp.Account.Application.Contracts.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue