forked from github/dataease
feat: 新增oidc配置
This commit is contained in:
parent
b9eecf8e21
commit
4930ec17fe
@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RequestMapping("/api/ldap")
|
||||
@RequestMapping("/plugin/ldap")
|
||||
@RestController
|
||||
public class XLdapServer {
|
||||
|
||||
|
@ -0,0 +1,27 @@
|
||||
package io.dataease.plugins.server;
|
||||
|
||||
|
||||
import io.dataease.plugins.config.SpringContextUtil;
|
||||
import io.dataease.plugins.xpack.display.dto.response.SysSettingDto;
|
||||
import io.dataease.plugins.xpack.oidc.service.OidcXpackService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RequestMapping("/plugin/oidc")
|
||||
@RestController
|
||||
public class XOidcServer {
|
||||
|
||||
|
||||
@PostMapping("/info")
|
||||
public List<SysSettingDto> getOidcInfo() {
|
||||
OidcXpackService oidcXpackService = SpringContextUtil.getBean(OidcXpackService.class);
|
||||
return oidcXpackService.oidcSettings();
|
||||
}
|
||||
|
||||
@PostMapping("/save")
|
||||
public void save(@RequestBody List<SysSettingDto> settings) {
|
||||
OidcXpackService oidcXpackService = SpringContextUtil.getBean(OidcXpackService.class);
|
||||
oidcXpackService.save(settings);
|
||||
}
|
||||
}
|
@ -100,7 +100,7 @@ export function roleGrid(pageIndex, pageSize, data) {
|
||||
|
||||
export function ldapUsers(data) {
|
||||
return request({
|
||||
url: '/api/ldap/users',
|
||||
url: '/plugin/ldap/users',
|
||||
method: 'post',
|
||||
loading: true
|
||||
})
|
||||
|
@ -232,7 +232,7 @@ export default {
|
||||
right: 178px;
|
||||
top: 8px;
|
||||
background: red;
|
||||
// color: #fff;
|
||||
color: #fff;
|
||||
border-radius: 17px;
|
||||
padding: 4px 7px;
|
||||
font-size: 16px;
|
||||
|
@ -532,6 +532,15 @@ export default {
|
||||
mapping_cannot_be_empty: 'LDAP 用户属性映射不能为空',
|
||||
password_cannot_be_empty: 'LDAP 密码不能为空'
|
||||
},
|
||||
oidc: {
|
||||
auth_endpoint: '请输入AuthEndpoint',
|
||||
token_endpoint: '请输入TokenEndpoint',
|
||||
userinfo_endpoint: '请输入UserinfoEndpoint',
|
||||
logout_endpoint: '请输入logoutEndpoint',
|
||||
clientId: '请输入ClientId',
|
||||
secret: '请输入Secret',
|
||||
open: '启用OIDC认证'
|
||||
},
|
||||
role: {
|
||||
menu_authorization: '菜单授权',
|
||||
data_authorization: '数据授权',
|
||||
|
@ -108,7 +108,7 @@ export default {
|
||||
loginImageUrl: null,
|
||||
loginLogoUrl: null,
|
||||
axiosFinished: false,
|
||||
openLdap: true
|
||||
openLdap: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
Loading…
Reference in New Issue
Block a user