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;
|
import java.util.List;
|
||||||
|
|
||||||
@RequestMapping("/api/ldap")
|
@RequestMapping("/plugin/ldap")
|
||||||
@RestController
|
@RestController
|
||||||
public class XLdapServer {
|
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) {
|
export function ldapUsers(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/ldap/users',
|
url: '/plugin/ldap/users',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
loading: true
|
loading: true
|
||||||
})
|
})
|
||||||
|
@ -232,7 +232,7 @@ export default {
|
|||||||
right: 178px;
|
right: 178px;
|
||||||
top: 8px;
|
top: 8px;
|
||||||
background: red;
|
background: red;
|
||||||
// color: #fff;
|
color: #fff;
|
||||||
border-radius: 17px;
|
border-radius: 17px;
|
||||||
padding: 4px 7px;
|
padding: 4px 7px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
@ -532,6 +532,15 @@ export default {
|
|||||||
mapping_cannot_be_empty: 'LDAP 用户属性映射不能为空',
|
mapping_cannot_be_empty: 'LDAP 用户属性映射不能为空',
|
||||||
password_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: {
|
role: {
|
||||||
menu_authorization: '菜单授权',
|
menu_authorization: '菜单授权',
|
||||||
data_authorization: '数据授权',
|
data_authorization: '数据授权',
|
||||||
|
@ -108,7 +108,7 @@ export default {
|
|||||||
loginImageUrl: null,
|
loginImageUrl: null,
|
||||||
loginLogoUrl: null,
|
loginLogoUrl: null,
|
||||||
axiosFinished: false,
|
axiosFinished: false,
|
||||||
openLdap: true
|
openLdap: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
Loading…
Reference in New Issue
Block a user