mirror of
https://github.com/dataease/dataease.git
synced 2026-06-09 21:27:21 +08:00
perf(X-Pack): OAuth2校验机制
This commit is contained in:
@@ -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
Submodule de-xpack updated: d883d74073...4b1d708155
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user