| | |
| | | } |
| | | conn.rPush(clientId, serializedAccessToken); |
| | | if (token.getExpiration() != null) { |
| | | int seconds = token.getExpiresIn(); |
| | | conn.expire(accessKey, seconds); |
| | | conn.expire(authKey, seconds); |
| | | conn.expire(authToAccessKey, seconds); |
| | | conn.expire(clientId, seconds); |
| | | conn.expire(approvalKey, seconds); |
| | | // int seconds = token.getExpiresIn(); |
| | | // conn.expire(accessKey, seconds); |
| | | // conn.expire(authKey, seconds); |
| | | // conn.expire(authToAccessKey, seconds); |
| | | // conn.expire(clientId, seconds); |
| | | // conn.expire(approvalKey, seconds); |
| | | } |
| | | //关闭Token刷新 |
| | | // OAuth2RefreshToken refreshToken = token.getRefreshToken(); |
| | |
| | | byte[] clientId = serializeKey(SecurityConstants.REDIS_CLIENT_ID_TO_ACCESS + authentication.getOAuth2Request().getClientId()); |
| | | conn.openPipeline(); |
| | | conn.del(authToAccessKey); |
| | | conn.lRem(unameKey, 1, access); |
| | | conn.del(unameKey); |
| | | // conn.lRem(unameKey, 1, access); |
| | | conn.lRem(clientId, 1, access); |
| | | conn.del(serialize(ACCESS + key)); |
| | | conn.closePipeline(); |