mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-06-02 10:57:49 +08:00
修改权限获取方式
This commit is contained in:
@@ -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));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user