forked from github/dataease
fix(登出): 对接cas后退出系统没有跳转到cas登录页面issues/2909
This commit is contained in:
parent
0cb0e3ff79
commit
b19914ce6b
@ -86,6 +86,7 @@ public class ShiroServiceImpl implements ShiroService {
|
||||
filterChainDefinitionMap.put("/api/auth/isOpenWecom", ANON);
|
||||
filterChainDefinitionMap.put("/api/auth/isOpenDingtalk", ANON);
|
||||
filterChainDefinitionMap.put("/api/auth/isOpenLark", ANON);
|
||||
filterChainDefinitionMap.put("/api/auth/isOpenCas", ANON);
|
||||
filterChainDefinitionMap.put("/api/auth/isOpenLarksuite", ANON);
|
||||
filterChainDefinitionMap.put("/api/auth/getPublicKey", ANON);
|
||||
filterChainDefinitionMap.put("/api/pluginCommon/component/*", ANON);
|
||||
@ -106,6 +107,7 @@ public class ShiroServiceImpl implements ShiroService {
|
||||
filterChainDefinitionMap.put("/plugin/larksuite/bind*", ANON);
|
||||
filterChainDefinitionMap.put("/plugin/larksuite/getQrParam", ANON);
|
||||
filterChainDefinitionMap.put("/cas/reset/**", ANON);
|
||||
filterChainDefinitionMap.put("/cas/loginPage", ANON);
|
||||
|
||||
filterChainDefinitionMap.put("/unauth", ANON);
|
||||
filterChainDefinitionMap.put("/display/**", ANON);
|
||||
|
@ -115,4 +115,13 @@ public class CasServer {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/loginPage")
|
||||
@ResponseBody
|
||||
public String loginPage() {
|
||||
String casServerUrlPrefix = systemParameterService.getValue("cas.login");
|
||||
String callBack = systemParameterService.getValue("cas.callBack");
|
||||
String result = casServerUrlPrefix + "?service=" + callBack;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -100,6 +100,13 @@ export function casStatus() {
|
||||
})
|
||||
}
|
||||
|
||||
export function casLoginPage() {
|
||||
return request({
|
||||
url: '/cas/loginPage',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function wecomStatus() {
|
||||
return request({
|
||||
url: '/api/auth/isOpenWecom',
|
||||
|
@ -130,17 +130,17 @@
|
||||
>
|
||||
<el-row class="code-contaniner">
|
||||
<plugin-com
|
||||
v-if="loginTypes.includes(4) && codeIndex === 4"
|
||||
v-if="codeShow && loginTypes.includes(4) && codeIndex === 4"
|
||||
ref="WecomQr"
|
||||
component-name="WecomQr"
|
||||
/>
|
||||
<plugin-com
|
||||
v-if="loginTypes.includes(5) && codeIndex === 5"
|
||||
v-if="codeShow && loginTypes.includes(5) && codeIndex === 5"
|
||||
ref="DingtalkQr"
|
||||
component-name="DingtalkQr"
|
||||
/>
|
||||
<plugin-com
|
||||
v-if="loginTypes.includes(6) && codeIndex === 6"
|
||||
v-if="codeShow && loginTypes.includes(6) && codeIndex === 6"
|
||||
ref="LarkQr"
|
||||
component-name="LarkQr"
|
||||
/>
|
||||
@ -210,7 +210,7 @@
|
||||
<script>
|
||||
|
||||
import { encrypt } from '@/utils/rsaEncrypt'
|
||||
import { ldapStatus, oidcStatus, getPublicKey, pluginLoaded, defaultLoginType, wecomStatus, dingtalkStatus, larkStatus, larksuiteStatus } from '@/api/user'
|
||||
import { ldapStatus, oidcStatus, getPublicKey, pluginLoaded, defaultLoginType, wecomStatus, dingtalkStatus, larkStatus, larksuiteStatus, casStatus, casLoginPage } from '@/api/user'
|
||||
import { getSysUI } from '@/utils/auth'
|
||||
import { changeFavicon } from '@/utils/index'
|
||||
import { initTheme } from '@/utils/ThemeUtil'
|
||||
@ -282,6 +282,12 @@ export default {
|
||||
this.contentShow = true
|
||||
})
|
||||
|
||||
casStatus().then(res => {
|
||||
if (res.success && res.data) {
|
||||
this.loginTypes.push(3)
|
||||
}
|
||||
})
|
||||
|
||||
ldapStatus().then(res => {
|
||||
if (res.success && res.data) {
|
||||
this.loginTypes.push(1)
|
||||
@ -340,6 +346,12 @@ export default {
|
||||
if (res && res.success) {
|
||||
this.defaultType = res.data
|
||||
}
|
||||
if (this.loginTypes.includes(3) && this.defaultType === 3) {
|
||||
casLoginPage().then(res => {
|
||||
debugger
|
||||
window.location.href = res.data
|
||||
})
|
||||
}
|
||||
this.setDefaultType()
|
||||
})
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user