fix: cognito groups matching fixed.
This commit is contained in:
parent
80024c8758
commit
4ae3578b31
1 changed files with 2 additions and 2 deletions
|
@ -59,8 +59,8 @@ public class CognitoAuthorityExtractor implements ProviderAuthorityExtractor {
|
||||||
.stream()
|
.stream()
|
||||||
.filter(s -> s.getProvider().equals(Provider.OAUTH_COGNITO))
|
.filter(s -> s.getProvider().equals(Provider.OAUTH_COGNITO))
|
||||||
.filter(s -> s.getType().equals("group"))
|
.filter(s -> s.getType().equals("group"))
|
||||||
.anyMatch(subject -> Stream.of(groups)
|
.anyMatch(subject -> groups
|
||||||
.map(Object::toString)
|
.stream()
|
||||||
.anyMatch(cognitoGroup -> cognitoGroup.equals(subject.getValue()))
|
.anyMatch(cognitoGroup -> cognitoGroup.equals(subject.getValue()))
|
||||||
))
|
))
|
||||||
.map(Role::getName)
|
.map(Role::getName)
|
||||||
|
|
Loading…
Add table
Reference in a new issue