Expect complex subclaims of additionalClaims to have type interface{}
Co-authored-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
parent
f494c61790
commit
6156fdf175
@ -1715,7 +1715,11 @@ func TestSupervisorLogin_Browser(t *testing.T) {
|
|||||||
|
|
||||||
func wantGroupsInAdditionalClaimsIfGroupsExist(additionalClaims map[string]interface{}, wantGroupsAdditionalClaimName string, wantGroups []string) map[string]interface{} {
|
func wantGroupsInAdditionalClaimsIfGroupsExist(additionalClaims map[string]interface{}, wantGroupsAdditionalClaimName string, wantGroups []string) map[string]interface{} {
|
||||||
if len(wantGroups) > 0 {
|
if len(wantGroups) > 0 {
|
||||||
additionalClaims[wantGroupsAdditionalClaimName] = wantGroups
|
var wantGroupsAnyType []interface{}
|
||||||
|
for _, group := range wantGroups {
|
||||||
|
wantGroupsAnyType = append(wantGroupsAnyType, group)
|
||||||
|
}
|
||||||
|
additionalClaims[wantGroupsAdditionalClaimName] = wantGroupsAnyType
|
||||||
}
|
}
|
||||||
return additionalClaims
|
return additionalClaims
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user