Support SPN in groups claim (#2474)

This commit is contained in:
Firstyear 2024-02-06 13:56:04 +10:00 committed by GitHub
parent 8cd62d4d4a
commit ddea9c6699
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2472,7 +2472,14 @@ fn extra_claims_for_account(
if scopes.contains(&"groups".to_string()) {
extra_claims.insert(
"groups".to_string(),
account.groups.iter().map(|x| x.to_proto().uuid).collect(),
account
.groups
.iter()
.flat_map(|x| {
let proto_group = x.to_proto();
[proto_group.spn, proto_group.uuid]
})
.collect(),
);
}