mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
captcha Support
This commit is contained in:
parent
be44a579c6
commit
7f39c233f6
4
NOTICE
4
NOTICE
@ -1,8 +1,8 @@
|
|||||||
MaxKey单点登录认证系统,谐音为马克思的钥匙,寓意是最大钥匙,是业界领先的企业级IAM身份管理和身份认证产品;
|
MaxKey单点登录认证系统,谐音为马克思的钥匙,寓意是最大钥匙,是业界领先的IAM身份管理和身份认证产品;
|
||||||
支持OAuth 2.x/OpenID Connect、SAML 2.0、JWT、CAS、SCIM等标准协议;
|
支持OAuth 2.x/OpenID Connect、SAML 2.0、JWT、CAS、SCIM等标准协议;
|
||||||
提供简单、标准、安全和开放的用户身份管理(IDM)、身份认证(AM)、单点登录(SSO)、资源管理和权限管理等
|
提供简单、标准、安全和开放的用户身份管理(IDM)、身份认证(AM)、单点登录(SSO)、资源管理和权限管理等
|
||||||
|
|
||||||
Maxkey Single Sign On system, which means the Maximum key, Leading-Edge Enterprise-Class IAM Identity and Access management product ,
|
Maxkey Single Sign On system, which means the Maximum key, Leading-Edge IAM Identity and Access management product ,
|
||||||
Support OAuth 2.x/OPENID CONNECT, SAML 2.0, JWT, CAS, SCIM and other standard protocols,
|
Support OAuth 2.x/OPENID CONNECT, SAML 2.0, JWT, CAS, SCIM and other standard protocols,
|
||||||
Provide Simple, Standard, Secure and Open Identity management (IDM), Access management (AM), Single Sign On (SSO), RBAC permission management and Resource management.
|
Provide Simple, Standard, Secure and Open Identity management (IDM), Access management (AM), Single Sign On (SSO), RBAC permission management and Resource management.
|
||||||
|
|
||||||
|
|||||||
@ -29,49 +29,45 @@ import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "MXK_INSTITUTIONS")
|
@Table(name = "MXK_INSTITUTIONS")
|
||||||
public class Institutions extends JpaBaseEntity implements Serializable {
|
public class Institutions extends JpaBaseEntity implements Serializable {
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = -2375872012431214098L;
|
private static final long serialVersionUID = -2375872012431214098L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column
|
@Column
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "snowflakeid")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "snowflakeid")
|
||||||
private String id;
|
private String id;
|
||||||
@Column
|
@Column
|
||||||
private String name;
|
private String name;
|
||||||
@Column
|
@Column
|
||||||
private String fullName;
|
private String fullName;
|
||||||
@Column
|
@Column
|
||||||
private String division;
|
private String division;
|
||||||
@Column
|
@Column
|
||||||
private String country;
|
private String country;
|
||||||
@Column
|
@Column
|
||||||
private String region;
|
private String region;
|
||||||
@Column
|
@Column
|
||||||
private String locality;
|
private String locality;
|
||||||
@Column
|
@Column
|
||||||
private String street;
|
private String street;
|
||||||
@Column
|
@Column
|
||||||
private String address;
|
private String address;
|
||||||
@Column
|
@Column
|
||||||
private String contact;
|
private String contact;
|
||||||
@Column
|
@Column
|
||||||
private String postalCode;
|
private String postalCode;
|
||||||
@Column
|
@Column
|
||||||
private String phone;
|
private String phone;
|
||||||
@Column
|
@Column
|
||||||
private String fax;
|
private String fax;
|
||||||
@Column
|
@Column
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
private int status;
|
private int status;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
private String logo;
|
private String logo;
|
||||||
@Column
|
@Column
|
||||||
@ -80,176 +76,222 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
|||||||
private String consoleTitle;
|
private String consoleTitle;
|
||||||
@Column
|
@Column
|
||||||
private String domain;
|
private String domain;
|
||||||
@Column
|
@Column
|
||||||
private String captcha;
|
private String captcha;
|
||||||
@Column
|
@Column
|
||||||
private String captchaSupport;
|
private String captchaSupport;
|
||||||
@Column
|
@Column
|
||||||
private String defaultUri;
|
private String defaultUri;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
String createdBy;
|
String createdBy;
|
||||||
@Column
|
@Column
|
||||||
String createdDate;
|
String createdDate;
|
||||||
@Column
|
@Column
|
||||||
String modifiedBy;
|
String modifiedBy;
|
||||||
@Column
|
@Column
|
||||||
String modifiedDate;
|
String modifiedDate;
|
||||||
|
|
||||||
public Institutions() {
|
public Institutions() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(String id) {
|
public void setId(String id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFullName() {
|
public String getFullName() {
|
||||||
return fullName;
|
return fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFullName(String fullName) {
|
public void setFullName(String fullName) {
|
||||||
this.fullName = fullName;
|
this.fullName = fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLogo() {
|
public String getLogo() {
|
||||||
return logo;
|
return logo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLogo(String logo) {
|
public void setLogo(String logo) {
|
||||||
this.logo = logo;
|
this.logo = logo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(String title) {
|
public void setTitle(String title) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getConsoleTitle() {
|
public String getConsoleTitle() {
|
||||||
return consoleTitle;
|
return consoleTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConsoleTitle(String consoleTitle) {
|
public void setConsoleTitle(String consoleTitle) {
|
||||||
this.consoleTitle = consoleTitle;
|
this.consoleTitle = consoleTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDomain() {
|
public String getDomain() {
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDomain(String domain) {
|
public void setDomain(String domain) {
|
||||||
this.domain = domain;
|
this.domain = domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDivision() {
|
public String getDivision() {
|
||||||
return division;
|
return division;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDivision(String division) {
|
public void setDivision(String division) {
|
||||||
this.division = division;
|
this.division = division;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCountry() {
|
public String getCountry() {
|
||||||
return country;
|
return country;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCountry(String country) {
|
public void setCountry(String country) {
|
||||||
this.country = country;
|
this.country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRegion() {
|
public String getRegion() {
|
||||||
return region;
|
return region;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRegion(String region) {
|
public void setRegion(String region) {
|
||||||
this.region = region;
|
this.region = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLocality() {
|
public String getLocality() {
|
||||||
return locality;
|
return locality;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLocality(String locality) {
|
public void setLocality(String locality) {
|
||||||
this.locality = locality;
|
this.locality = locality;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStreet() {
|
public String getStreet() {
|
||||||
return street;
|
return street;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStreet(String street) {
|
public void setStreet(String street) {
|
||||||
this.street = street;
|
this.street = street;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAddress(String address) {
|
public void setAddress(String address) {
|
||||||
this.address = address;
|
this.address = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getContact() {
|
public String getContact() {
|
||||||
return contact;
|
return contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContact(String contact) {
|
public void setContact(String contact) {
|
||||||
this.contact = contact;
|
this.contact = contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPostalCode() {
|
public String getPostalCode() {
|
||||||
return postalCode;
|
return postalCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPostalCode(String postalCode) {
|
public void setPostalCode(String postalCode) {
|
||||||
this.postalCode = postalCode;
|
this.postalCode = postalCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPhone() {
|
public String getPhone() {
|
||||||
return phone;
|
return phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPhone(String phone) {
|
public void setPhone(String phone) {
|
||||||
this.phone = phone;
|
this.phone = phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFax() {
|
public String getFax() {
|
||||||
return fax;
|
return fax;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFax(String fax) {
|
public void setFax(String fax) {
|
||||||
this.fax = fax;
|
this.fax = fax;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(String email) {
|
public void setEmail(String email) {
|
||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description) {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStatus() {
|
public int getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(int status) {
|
public void setStatus(int status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreatedBy() {
|
public String getCreatedBy() {
|
||||||
return createdBy;
|
return createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatedBy(String createdBy) {
|
public void setCreatedBy(String createdBy) {
|
||||||
this.createdBy = createdBy;
|
this.createdBy = createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreatedDate() {
|
public String getCreatedDate() {
|
||||||
return createdDate;
|
return createdDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatedDate(String createdDate) {
|
public void setCreatedDate(String createdDate) {
|
||||||
this.createdDate = createdDate;
|
this.createdDate = createdDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getModifiedBy() {
|
public String getModifiedBy() {
|
||||||
return modifiedBy;
|
return modifiedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setModifiedBy(String modifiedBy) {
|
public void setModifiedBy(String modifiedBy) {
|
||||||
this.modifiedBy = modifiedBy;
|
this.modifiedBy = modifiedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getModifiedDate() {
|
public String getModifiedDate() {
|
||||||
return modifiedDate;
|
return modifiedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setModifiedDate(String modifiedDate) {
|
public void setModifiedDate(String modifiedDate) {
|
||||||
this.modifiedDate = modifiedDate;
|
this.modifiedDate = modifiedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getCaptcha() {
|
public String getCaptcha() {
|
||||||
return captcha;
|
return captcha;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCaptcha(String captcha) {
|
public void setCaptcha(String captcha) {
|
||||||
this.captcha = captcha;
|
this.captcha = captcha;
|
||||||
}
|
}
|
||||||
@ -257,21 +299,23 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
|||||||
public String getCaptchaSupport() {
|
public String getCaptchaSupport() {
|
||||||
return captchaSupport;
|
return captchaSupport;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCaptchaSupport() {
|
public boolean isTrueCaptchaSupport() {
|
||||||
return "YES".equalsIgnoreCase(captchaSupport);
|
return "YES".equalsIgnoreCase(captchaSupport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setCaptchaSupport(String captchaSupport) {
|
public void setCaptchaSupport(String captchaSupport) {
|
||||||
this.captchaSupport = captchaSupport;
|
this.captchaSupport = captchaSupport;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDefaultUri() {
|
public String getDefaultUri() {
|
||||||
return defaultUri;
|
return defaultUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDefaultUri(String defaultUri) {
|
public void setDefaultUri(String defaultUri) {
|
||||||
this.defaultUri = defaultUri;
|
this.defaultUri = defaultUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
|||||||
@ -121,7 +121,7 @@ public class LoginEndpoint {
|
|||||||
modelAndView.addObject("userDomainUrlJson", kerberosService.buildKerberosProxys());
|
modelAndView.addObject("userDomainUrlJson", kerberosService.buildKerberosProxys());
|
||||||
}
|
}
|
||||||
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
|
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
|
||||||
modelAndView.addObject("isCaptcha", inst.isCaptchaSupport());
|
modelAndView.addObject("isCaptcha", inst.isTrueCaptchaSupport());
|
||||||
modelAndView.addObject("captcha", inst.getCaptcha());
|
modelAndView.addObject("captcha", inst.getCaptcha());
|
||||||
modelAndView.addObject("sessionid", WebContext.getSession().getId());
|
modelAndView.addObject("sessionid", WebContext.getSession().getId());
|
||||||
//modelAndView.addObject("jwtToken",jwtLoginService.buildLoginJwt());
|
//modelAndView.addObject("jwtToken",jwtLoginService.buildLoginJwt());
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public class LoginEndpoint {
|
|||||||
ModelAndView modelAndView = new ModelAndView();
|
ModelAndView modelAndView = new ModelAndView();
|
||||||
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
|
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
|
||||||
modelAndView.addObject("isRemeberMe", applicationConfig.getLoginConfig().isRemeberMe());
|
modelAndView.addObject("isRemeberMe", applicationConfig.getLoginConfig().isRemeberMe());
|
||||||
modelAndView.addObject("isCaptcha", inst.isCaptchaSupport());
|
modelAndView.addObject("isCaptcha", inst.isTrueCaptchaSupport());
|
||||||
modelAndView.addObject("captcha", inst.getCaptcha());
|
modelAndView.addObject("captcha", inst.getCaptcha());
|
||||||
modelAndView.addObject("sessionid", WebContext.getSession().getId());
|
modelAndView.addObject("sessionid", WebContext.getSession().getId());
|
||||||
Object loginErrorMessage=WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE);
|
Object loginErrorMessage=WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE);
|
||||||
|
|||||||
@ -242,8 +242,8 @@
|
|||||||
<label class="col-sm-3 col-form-label"><@locale code="institutions.captchaSupport" /></label>
|
<label class="col-sm-3 col-form-label"><@locale code="institutions.captchaSupport" /></label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select id="captchaSupport" name="captchaSupport" class="form-control form-select" >
|
<select id="captchaSupport" name="captchaSupport" class="form-control form-select" >
|
||||||
<option value="YES" <#if 'YES'==model.captchaSupport!>selected</#if>><@locale code="common.text.yes"/></option>
|
<option value="YES" <#if 'YES' == model.captchaSupport!>selected</#if>><@locale code="common.text.yes"/></option>
|
||||||
<option value="NO" <#if 'NO'==model.captchaSupport!>selected</#if>><@locale code="common.text.no"/></option>
|
<option value="NO" <#if 'NO' == model.captchaSupport!>selected</#if>><@locale code="common.text.no"/></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user