Merge pull request #3489 from dataease/pr@dev@fix_cas_logout
fix(登出): 对接cas后退出系统没有跳转到cas登录页面issues/2909
This commit is contained in:
commit
3b5b4a3bb9
@ -86,6 +86,7 @@ public class ShiroServiceImpl implements ShiroService {
|
|||||||
filterChainDefinitionMap.put("/api/auth/isOpenWecom", ANON);
|
filterChainDefinitionMap.put("/api/auth/isOpenWecom", ANON);
|
||||||
filterChainDefinitionMap.put("/api/auth/isOpenDingtalk", ANON);
|
filterChainDefinitionMap.put("/api/auth/isOpenDingtalk", ANON);
|
||||||
filterChainDefinitionMap.put("/api/auth/isOpenLark", ANON);
|
filterChainDefinitionMap.put("/api/auth/isOpenLark", ANON);
|
||||||
|
filterChainDefinitionMap.put("/api/auth/isOpenCas", ANON);
|
||||||
filterChainDefinitionMap.put("/api/auth/isOpenLarksuite", ANON);
|
filterChainDefinitionMap.put("/api/auth/isOpenLarksuite", ANON);
|
||||||
filterChainDefinitionMap.put("/api/auth/getPublicKey", ANON);
|
filterChainDefinitionMap.put("/api/auth/getPublicKey", ANON);
|
||||||
filterChainDefinitionMap.put("/api/pluginCommon/component/*", 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/bind*", ANON);
|
||||||
filterChainDefinitionMap.put("/plugin/larksuite/getQrParam", ANON);
|
filterChainDefinitionMap.put("/plugin/larksuite/getQrParam", ANON);
|
||||||
filterChainDefinitionMap.put("/cas/reset/**", ANON);
|
filterChainDefinitionMap.put("/cas/reset/**", ANON);
|
||||||
|
filterChainDefinitionMap.put("/cas/loginPage", ANON);
|
||||||
|
|
||||||
filterChainDefinitionMap.put("/unauth", ANON);
|
filterChainDefinitionMap.put("/unauth", ANON);
|
||||||
filterChainDefinitionMap.put("/display/**", ANON);
|
filterChainDefinitionMap.put("/display/**", ANON);
|
||||||
|
|||||||
@ -115,4 +115,13 @@ public class CasServer {
|
|||||||
return error;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -102,6 +102,13 @@ export function casStatus() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function casLoginPage() {
|
||||||
|
return request({
|
||||||
|
url: '/cas/loginPage',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function wecomStatus() {
|
export function wecomStatus() {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/auth/isOpenWecom',
|
url: '/api/auth/isOpenWecom',
|
||||||
|
|||||||
@ -130,17 +130,17 @@
|
|||||||
>
|
>
|
||||||
<el-row class="code-contaniner">
|
<el-row class="code-contaniner">
|
||||||
<plugin-com
|
<plugin-com
|
||||||
v-if="loginTypes.includes(4) && codeIndex === 4"
|
v-if="codeShow && loginTypes.includes(4) && codeIndex === 4"
|
||||||
ref="WecomQr"
|
ref="WecomQr"
|
||||||
component-name="WecomQr"
|
component-name="WecomQr"
|
||||||
/>
|
/>
|
||||||
<plugin-com
|
<plugin-com
|
||||||
v-if="loginTypes.includes(5) && codeIndex === 5"
|
v-if="codeShow && loginTypes.includes(5) && codeIndex === 5"
|
||||||
ref="DingtalkQr"
|
ref="DingtalkQr"
|
||||||
component-name="DingtalkQr"
|
component-name="DingtalkQr"
|
||||||
/>
|
/>
|
||||||
<plugin-com
|
<plugin-com
|
||||||
v-if="loginTypes.includes(6) && codeIndex === 6"
|
v-if="codeShow && loginTypes.includes(6) && codeIndex === 6"
|
||||||
ref="LarkQr"
|
ref="LarkQr"
|
||||||
component-name="LarkQr"
|
component-name="LarkQr"
|
||||||
/>
|
/>
|
||||||
@ -210,7 +210,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { encrypt } from '@/utils/rsaEncrypt'
|
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 { getSysUI } from '@/utils/auth'
|
||||||
import { changeFavicon } from '@/utils/index'
|
import { changeFavicon } from '@/utils/index'
|
||||||
import { initTheme } from '@/utils/ThemeUtil'
|
import { initTheme } from '@/utils/ThemeUtil'
|
||||||
@ -282,6 +282,12 @@ export default {
|
|||||||
this.contentShow = true
|
this.contentShow = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
casStatus().then(res => {
|
||||||
|
if (res.success && res.data) {
|
||||||
|
this.loginTypes.push(3)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
ldapStatus().then(res => {
|
ldapStatus().then(res => {
|
||||||
if (res.success && res.data) {
|
if (res.success && res.data) {
|
||||||
this.loginTypes.push(1)
|
this.loginTypes.push(1)
|
||||||
@ -340,6 +346,12 @@ export default {
|
|||||||
if (res && res.success) {
|
if (res && res.success) {
|
||||||
this.defaultType = res.data
|
this.defaultType = res.data
|
||||||
}
|
}
|
||||||
|
if (this.loginTypes.includes(3) && this.defaultType === 3) {
|
||||||
|
casLoginPage().then(res => {
|
||||||
|
debugger
|
||||||
|
window.location.href = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
this.setDefaultType()
|
this.setDefaultType()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user