revert: 回退apikeyfilter的代码
This commit is contained in:
parent
abe075ec27
commit
e21ea99dab
|
@ -20,12 +20,9 @@ public class ApiKeyFilter extends AnonymousFilter {
|
||||||
// 不是apikey的通过
|
// 不是apikey的通过
|
||||||
if (!ApiKeyHandler.isApiKeyCall(httpRequest) && !SecurityUtils.getSubject().isAuthenticated()) {
|
if (!ApiKeyHandler.isApiKeyCall(httpRequest) && !SecurityUtils.getSubject().isAuthenticated()) {
|
||||||
// sso 带了token的
|
// sso 带了token的
|
||||||
String token = httpRequest.getHeader(SessionConstants.SSO_TOKEN);
|
String userId = SSOSessionHandler.validate(httpRequest);
|
||||||
if (StringUtils.isNotBlank(token)) {
|
if (StringUtils.isNotBlank(userId)) {
|
||||||
String userId = SSOSessionHandler.validate(httpRequest);
|
SecurityUtils.getSubject().login(new UsernamePasswordToken(userId, SSOSessionHandler.random));
|
||||||
if (StringUtils.isNotBlank(userId)) {
|
|
||||||
SecurityUtils.getSubject().login(new UsernamePasswordToken(userId, SSOSessionHandler.random));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue