skymarshal: behaviour: Handle groups as maps
There are cases when groups are represented as a list of maps, not strings e.g. "groups":[{"id":"1", "name":"gr1"},{"id": "2", "name":"gr2"}]. Handle groups represented as a list of maps. concourse/dex#23 Signed-off-by: Vlad Safronov <vladislav.safronov@oracle.com>
This commit is contained in:
parent
f980d3e0a7
commit
45932bd38a
@ -247,6 +247,9 @@ func (c *oauthConnector) addGroupsFromMap(groups map[string]struct{}, result map
|
||||
if groupString, ok := group.(string); ok {
|
||||
groups[groupString] = struct{}{}
|
||||
}
|
||||
if groupMap, ok := group.(map[string]interface{}); ok {
|
||||
groups[groupMap["name"]] = true
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user