Ver Fonte

Merge branch 'zx_saas_qrLogin' of http://git.dayaedu.com/yonge/mec into dev

zouxuan há 1 ano atrás
pai
commit
73f9121001

+ 2 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/service/CustomTokenServices.java

@@ -234,7 +234,8 @@ public class CustomTokenServices implements AuthorizationServerTokenServices, Re
 
 		OAuth2Authentication authentication = tokenStore.readAuthentication(accessToken);
 
-		if (StringUtils.equalsIgnoreCase("system", authentication.getOAuth2Request().getClientId())) {
+		if (StringUtils.equalsIgnoreCase("system", authentication.getOAuth2Request().getClientId())
+		|| StringUtils.equalsIgnoreCase("qr_teacher", authentication.getOAuth2Request().getClientId())) {
 			int validitySeconds = getAccessTokenValiditySeconds(authentication.getOAuth2Request());
 			if (validitySeconds > 0) {
 				oAuth2AccessToken.setExpiration(new Date(System.currentTimeMillis() + (validitySeconds * 1000L)));