mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
验证码调整
This commit is contained in:
parent
9a55b6b8d5
commit
3892b05718
@ -78,8 +78,9 @@ public class NormalAuthenticationProvider extends AbstractAuthenticationProvider
|
||||
|
||||
if(this.applicationConfig.getLoginConfig().isCaptcha()) {
|
||||
captchaValid(loginCredential.getState(),loginCredential.getCaptcha());
|
||||
}
|
||||
else if(inst.getCaptchaSupport().equalsIgnoreCase("YES")) {
|
||||
|
||||
}else if(!inst.getCaptcha().equalsIgnoreCase("NONE")) {
|
||||
|
||||
captchaValid(loginCredential.getState(),loginCredential.getCaptcha());
|
||||
}
|
||||
|
||||
|
||||
@ -78,9 +78,8 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
private String consoleTitle;
|
||||
|
||||
@Column
|
||||
private String captchaType;
|
||||
@Column
|
||||
private String captchaSupport;
|
||||
private String captcha;
|
||||
|
||||
@Column
|
||||
private String defaultUri;
|
||||
|
||||
@ -130,14 +129,6 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
this.frontTitle = frontTitle;
|
||||
}
|
||||
|
||||
public String getCaptchaType() {
|
||||
return captchaType;
|
||||
}
|
||||
|
||||
public void setCaptchaType(String captchaType) {
|
||||
this.captchaType = captchaType;
|
||||
}
|
||||
|
||||
public String getConsoleDomain() {
|
||||
return consoleDomain;
|
||||
}
|
||||
@ -259,12 +250,12 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
public String getCaptchaSupport() {
|
||||
return captchaSupport;
|
||||
public String getCaptcha() {
|
||||
return captcha;
|
||||
}
|
||||
|
||||
public void setCaptchaSupport(String captchaSupport) {
|
||||
this.captchaSupport = captchaSupport;
|
||||
public void setCaptcha(String captcha) {
|
||||
this.captcha = captcha;
|
||||
}
|
||||
|
||||
public String getDefaultUri() {
|
||||
@ -310,16 +301,16 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
builder.append(description);
|
||||
builder.append(", logo=");
|
||||
builder.append(logo);
|
||||
builder.append(", frontTitle=");
|
||||
builder.append(frontTitle);
|
||||
builder.append(", consoleTitle=");
|
||||
builder.append(consoleTitle);
|
||||
builder.append(", domain=");
|
||||
builder.append(domain);
|
||||
builder.append(", captchaType=");
|
||||
builder.append(captchaType);
|
||||
builder.append(", captchaSupport=");
|
||||
builder.append(captchaSupport);
|
||||
builder.append(", frontTitle=");
|
||||
builder.append(frontTitle);
|
||||
builder.append(", consoleDomain=");
|
||||
builder.append(consoleDomain);
|
||||
builder.append(", consoleTitle=");
|
||||
builder.append(consoleTitle);
|
||||
builder.append(", captcha=");
|
||||
builder.append(captcha);
|
||||
builder.append(", defaultUri=");
|
||||
builder.append(defaultUri);
|
||||
builder.append("]");
|
||||
|
||||
@ -96,8 +96,7 @@ public class InstitutionsRepository {
|
||||
institution.setFrontTitle(rs.getString("fronttitle"));
|
||||
institution.setConsoleDomain(rs.getString("consoledomain"));
|
||||
institution.setConsoleTitle(rs.getString("consoletitle"));
|
||||
institution.setCaptchaType(rs.getString("captchatype"));
|
||||
institution.setCaptchaSupport(rs.getString("captchasupport"));
|
||||
institution.setCaptcha(rs.getString("captcha"));
|
||||
institution.setDefaultUri(rs.getString("defaultUri"));
|
||||
return institution;
|
||||
}
|
||||
|
||||
@ -28,7 +28,6 @@ export class Institutions extends BaseEntity {
|
||||
consoleTitle!: String;
|
||||
consoleDomain!: String;
|
||||
domain!: String;
|
||||
captchaType!: String;
|
||||
captchaSupport!: String;
|
||||
captcha!: String;
|
||||
defaultUri!: String;
|
||||
}
|
||||
|
||||
@ -64,26 +64,16 @@
|
||||
name="consoleTitle" id="consoleTitle" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzMd]="6" nzFor="captchaSupport">{{ 'mxk.institutions.captchaSupport' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzMd]="18" nzErrorTip="The input is not valid captchaSupport!">
|
||||
<nz-radio-group [(ngModel)]="form.model.captchaSupport" [ngModelOptions]="{ standalone: true }"
|
||||
nzButtonStyle="solid">
|
||||
<label nz-radio-button nzValue="YES">{{ 'mxk.text.yes' | i18n }}</label>
|
||||
<label nz-radio-button nzValue="NO">{{ 'mxk.text.no' | i18n }}</label>
|
||||
</nz-radio-group>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzMd]="6" nzFor="captchaType">{{ 'mxk.institutions.captchaType' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzMd]="18" nzErrorTip="The input is not valid captchaType!">
|
||||
<nz-select [(ngModel)]="form.model.captchaType" [ngModelOptions]="{ standalone: true }">
|
||||
<nz-select [(ngModel)]="form.model.captcha" [ngModelOptions]="{ standalone: true }">
|
||||
<nz-option nzValue="NONE" nzLabel="{{ 'mxk.institutions.captchaType.none' | i18n }}"></nz-option>
|
||||
<nz-option nzValue="TEXT" nzLabel="{{ 'mxk.institutions.captchaType.text' | i18n }}"></nz-option>
|
||||
<nz-option nzValue="ARITHMETIC" nzLabel="{{ 'mxk.institutions.captchaType.arithmetic' | i18n }}"></nz-option>
|
||||
</nz-select>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzMd]="6" nzFor="contact">{{ 'mxk.institutions.contact' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzMd]="18" nzErrorTip="The input is not valid contact!">
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
<nz-option nzValue="company" nzLabel="{{ 'mxk.organizations.type.company' | i18n }}"></nz-option>
|
||||
<nz-option nzValue="division" nzLabel="{{ 'mxk.organizations.type.division' | i18n }}"></nz-option>
|
||||
<nz-option nzValue="department" nzLabel="{{ 'mxk.organizations.type.department' | i18n }}"></nz-option>
|
||||
<nz-option nzValue="team" nzLabel="{{ 'mxk.organizations.type.team' | i18n }}"></nz-option>
|
||||
<nz-option nzValue="entity" nzLabel="{{ 'mxk.organizations.type.entity' | i18n }}"></nz-option>
|
||||
<nz-option nzValue="virtual" nzLabel="{{ 'mxk.organizations.type.virtual' | i18n }}"></nz-option>
|
||||
</nz-select>
|
||||
|
||||
@ -193,6 +193,7 @@
|
||||
"type.company": "Company",
|
||||
"type.division": "Division",
|
||||
"type.department": "Department",
|
||||
"type.team": "Team",
|
||||
"type.entity": "Entity",
|
||||
"type.virtual": "Virtual",
|
||||
"codePath": "Code Path",
|
||||
@ -502,6 +503,7 @@
|
||||
"consoleTitle": "Console Title",
|
||||
"consoleDomain": "Console Domain",
|
||||
"captchaType": "Captcha Type",
|
||||
"captchaType.none": "None",
|
||||
"captchaType.text": "Text",
|
||||
"captchaType.arithmetic": "Arithmetic",
|
||||
"captchaSupport": "Captcha Support",
|
||||
|
||||
@ -194,6 +194,7 @@
|
||||
"type.company": "公司",
|
||||
"type.division": "分支机构",
|
||||
"type.department": "部门",
|
||||
"type.team": "组",
|
||||
"type.entity": "实体",
|
||||
"type.virtual": "虚拟",
|
||||
"codePath": "编码路径",
|
||||
@ -500,6 +501,7 @@
|
||||
"consoleDomain": "控制台域名",
|
||||
"consoleTitle": "控制台名称",
|
||||
"captchaType": "验证码",
|
||||
"captchaType.none": "无",
|
||||
"captchaType.text": "字符",
|
||||
"captchaType.arithmetic": "算术",
|
||||
"captchaSupport": "验证码支持",
|
||||
|
||||
@ -195,6 +195,7 @@
|
||||
"type.company": "公司",
|
||||
"type.division": "分支機搆",
|
||||
"type.department": "部門",
|
||||
"type.team": "組",
|
||||
"type.entity": "實體",
|
||||
"type.virtual": "虛擬",
|
||||
"codePath": "編碼路徑",
|
||||
@ -501,6 +502,7 @@
|
||||
"consoleDomain": "控制台域名",
|
||||
"consoleTitle": "控制台名稱",
|
||||
"captchaType": "驗證碼",
|
||||
"captchaType.none": "無",
|
||||
"captchaType.text": "字符",
|
||||
"captchaType.arithmetic": "算術",
|
||||
"captchaSupport": "驗證碼支持",
|
||||
|
||||
@ -142,8 +142,7 @@ public class LoginEntryPoint {
|
||||
if(applicationConfig.getLoginConfig().isCaptcha()) {
|
||||
model.put("captcha", "true");
|
||||
}else {
|
||||
model.put("captcha", inst.getCaptchaSupport());
|
||||
model.put("captchaType", inst.getCaptchaType());
|
||||
model.put("captcha", inst.getCaptcha());
|
||||
}
|
||||
model.put("state", authTokenService.genRandomJwt());
|
||||
//load Social Sign On Providers
|
||||
|
||||
@ -72,8 +72,7 @@ public class LoginEntryPoint {
|
||||
if(applicationConfig.getLoginConfig().isCaptcha()) {
|
||||
model.put("captcha", "true");
|
||||
}else {
|
||||
model.put("captcha", inst.getCaptchaSupport());
|
||||
model.put("captchaType", inst.getCaptchaType());
|
||||
model.put("captcha", inst.getCaptcha());
|
||||
}
|
||||
model.put("state", authTokenService.genRandomJwt());
|
||||
return new Message<HashMap<String , Object>>(model).buildResponse();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user