修改权限获取方式

This commit is contained in:
zhouhao
2017-07-12 22:00:29 +08:00
parent a4a31d3546
commit 2018be7b56

View File

@@ -36,13 +36,16 @@ public class WebSocketUtils {
.add(tmp[1].trim());
}
Function<Set<String>, Optional<Authentication>> userGetter = set ->
set == null ? Optional.empty() : set.stream()
.map(container::getByToken)
.filter(Objects::nonNull).findFirst();
return userGetter.apply(sessionId.get("SESSION"))
.orElseGet(() -> userGetter.apply(sessionId.get("JSESSIONID")).orElse(null));
// TODO: 2017/7/12 修改权限获取方式
throw new UnsupportedOperationException();
// Function<Set<String>, Optional<Authentication>> userGetter = set ->
// set == null ? Optional.empty() : set.stream()
// .map(container::getByToken)
// .filter(Objects::nonNull)
// .findFirst();
//
// return userGetter.apply(sessionId.get("SESSION"))
// .orElseGet(() -> userGetter.apply(sessionId.get("JSESSIONID")).orElse(null));
}
}