forked from github/dataease
perf(X-Pack): OAuth2校验机制
This commit is contained in:
parent
a7add09991
commit
82aa669977
@ -3,7 +3,6 @@ import router from '@/router'
|
||||
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import request from '@/config/axios'
|
||||
|
||||
const { wsCache } = useCache()
|
||||
const permissionStore = usePermissionStoreWithOut()
|
||||
@ -11,12 +10,6 @@ const userStore = useUserStoreWithOut()
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
|
||||
export const logoutHandler = (justClean?: boolean) => {
|
||||
const idToken = wsCache.get('oauth2-id-token')
|
||||
if (idToken) {
|
||||
request.get({ url: `/oauth2/logout/${idToken}` }).finally(() => {
|
||||
wsCache.delete('oauth2-id-token')
|
||||
})
|
||||
}
|
||||
userStore.clear()
|
||||
userStore.$reset()
|
||||
permissionStore.clear()
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit d883d74073867950a4347dc50b417c3093298e60
|
||||
Subproject commit 4b1d7081554441fd75b18bef9b02779389076b16
|
@ -6,7 +6,6 @@ import io.dataease.api.xpack.settings.vo.XpackOauthAuthVO;
|
||||
import io.dataease.api.xpack.settings.vo.XpackOauthTokenVO;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@ -20,6 +19,4 @@ public interface XpackOauth2Api {
|
||||
@PostMapping("/token")
|
||||
XpackOauthTokenVO oauth2Token(@RequestBody XpackOauth2TokenRequest request);
|
||||
|
||||
@GetMapping("/logout/{idToken}")
|
||||
void logout(@PathVariable("idToken") String idToken);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user