Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stateless模式的JWT使用方式 logout没有事件推送吗? #625

Open
qinkangdeid opened this issue May 20, 2024 · 0 comments
Open

Comments

@qinkangdeid
Copy link

对以下问题有疑问:

版本:1.37.0

< 备注:请尽量详细描述问题所在 >

使用的是 Stateless模式的JWT集成方式,想在logout方法监听事件

查看 cn.dev33.satoken.stp.StpLogic#logoutByTokenValue的方法有看到有:SaTokenEventCenter.doLogout(loginType, loginId, tokenValue);

但是查看 StpLogicJwtForStateless继承了 StpLogic的 logout():

    public void logout() {
        String tokenValue = this.getTokenValue();
        if (!SaFoxUtil.isEmpty(tokenValue)) {
            SaHolder.getStorage().delete(this.splicingKeyJustCreatedSave());
            if (this.getConfigOrGlobal().getIsReadCookie()) {
                SaHolder.getResponse().deleteCookie(this.getTokenName());
            }

        }
    }

没有 SaTokenEventCenter.doLogout(loginType, loginId, tokenValue);StpLogicJwtForMixin模式也一样

jwt模式没清理啥 是否也可以添加事件发送?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant