From 7fcc6f246b1ef39a45dcbe51de47b868ba3de4df Mon Sep 17 00:00:00 2001 From: zhou-hao Date: Thu, 30 Nov 2017 20:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BE=9D=E8=B5=96=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/authorization/basic/web/UserOnSignIn.java | 8 +------- .../web/authorization/basic/web/UserOnSignOut.java | 9 +-------- .../oauth2/client/simple/SimpleOAuth2RequestService.java | 1 + .../client/simple/session/AuthorizationCodeSession.java | 2 +- .../oauth2/client/simple/session/PasswordSession.java | 2 +- 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/web/UserOnSignIn.java b/hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/web/UserOnSignIn.java index d320f1230..4b26c57f4 100644 --- a/hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/web/UserOnSignIn.java +++ b/hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/web/UserOnSignIn.java @@ -21,8 +21,7 @@ import java.util.List; * @see UserTokenGenerator * @since 3.0 */ -public class UserOnSignIn implements AuthorizationListener - , ApplicationListener { +public class UserOnSignIn implements ApplicationListener { /** * 默认到令牌类型 @@ -51,11 +50,6 @@ public class UserOnSignIn implements AuthorizationListener,ApplicationListener { +public class UserOnSignOut implements ApplicationListener { private UserTokenManager userTokenManager; public UserOnSignOut(UserTokenManager userTokenManager) { this.userTokenManager = userTokenManager; } - @Override - public void on(AuthorizationExitEvent event) { - onApplicationEvent(event); - } - private String geToken() { UserToken token = UserTokenHolder.currentToken(); return null != token ? token.getToken() : ""; diff --git a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/SimpleOAuth2RequestService.java b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/SimpleOAuth2RequestService.java index a192890e0..47bf390e1 100644 --- a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/SimpleOAuth2RequestService.java +++ b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/SimpleOAuth2RequestService.java @@ -86,6 +86,7 @@ public class SimpleOAuth2RequestService implements OAuth2RequestService { } @Override + @SuppressWarnings("unchecked") public void doEvent(String serverId, OAuth2Event event, Class eventType) { listenerStore.getOrDefault(serverId, Collections.emptyMap()) .getOrDefault(eventType, Collections.emptyList()) diff --git a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/session/AuthorizationCodeSession.java b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/session/AuthorizationCodeSession.java index 8da2d8450..55e3c0d8d 100644 --- a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/session/AuthorizationCodeSession.java +++ b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/session/AuthorizationCodeSession.java @@ -18,10 +18,10 @@ package org.hswebframework.web.authorization.oauth2.client.simple.session; -import org.hswebframework.web.authorization.oauth2.client.OAuth2Constants; import org.hswebframework.web.authorization.oauth2.client.request.OAuth2Request; import org.hswebframework.web.authorization.oauth2.client.request.OAuth2Session; import org.hswebframework.web.oauth2.core.GrantType; +import org.hswebframework.web.oauth2.core.OAuth2Constants; /** * @author zhouhao diff --git a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/session/PasswordSession.java b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/session/PasswordSession.java index b7281225b..6f350588d 100644 --- a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/session/PasswordSession.java +++ b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/simple/session/PasswordSession.java @@ -18,9 +18,9 @@ package org.hswebframework.web.authorization.oauth2.client.simple.session; -import org.hswebframework.web.authorization.oauth2.client.OAuth2Constants; import org.hswebframework.web.authorization.oauth2.client.request.OAuth2Request; import org.hswebframework.web.oauth2.core.GrantType; +import org.hswebframework.web.oauth2.core.OAuth2Constants; /** * @author zhouhao