perf: 支持oidc单点登录

This commit is contained in:
xiaojunnuo
2025-11-27 01:59:22 +08:00
parent c7b298c46f
commit ec75afbc44
25 changed files with 633 additions and 103 deletions
@@ -16,7 +16,7 @@ export class SysPublicSettings extends BaseSettings {
static __access__ = 'public';
registerEnabled = false;
userValidTimeEnabled?:boolean = false;
userValidTimeEnabled?: boolean = false;
passwordLoginEnabled = true;
usernameRegisterEnabled = true;
mobileRegisterEnabled = false;
@@ -36,7 +36,7 @@ export class SysPublicSettings extends BaseSettings {
captchaEnabled = false;
//验证码类型
captchaType?: string;
captchaAddonId?:number;
captchaAddonId?: number;
@@ -49,6 +49,14 @@ export class SysPublicSettings extends BaseSettings {
// 固定证书有效期天数,0表示不固定
fixedCertExpireDays?: number;
// 第三方OAuth配置
oauthEnabled?: boolean = false;
oauthProviders: Record<string, {
type: string;
title: string;
addonId: number;
}> = {};
}
export class SysPrivateSettings extends BaseSettings {
@@ -69,9 +77,9 @@ export class SysPrivateSettings extends BaseSettings {
type?: string;
config?: any;
} = {
type: 'aliyun',
config: {},
};
type: 'aliyun',
config: {},
};
removeSecret() {
const clone = cloneDeep(this);
@@ -196,7 +204,7 @@ export class SysSuiteSetting extends BaseSettings {
static __key__ = 'sys.suite';
static __access__ = 'private';
enabled:boolean = false;
enabled: boolean = false;
registerGift?: {
productId: number;
@@ -221,22 +229,9 @@ export class SysSafeSetting extends BaseSettings {
static __access__ = 'private';
// 站点隐藏
hidden:SiteHidden = {
hidden: SiteHidden = {
enabled: false,
hiddenOpenApi:false,
hiddenOpenApi: false,
autoHiddenTimes: 5,
};
}
export class SysOauthSetting extends BaseSettings {
static __title__ = 'OAuth设置';
static __key__ = 'sys.oauth';
static __access__ = 'private';
oauths: Record<string, {
type: string;
title: string;
addonId: number;
}> = {};
}
@@ -76,7 +76,7 @@ export class AddonService extends BaseService<AddonEntity> {
getDefineList(addonType: string) {
return addonRegistry.getDefineList();
return addonRegistry.getDefineList(addonType);
}
getDefineByType(type: string, prefix?: string) {