Expect complex subclaims of additionalClaims to have type interface{}

Co-authored-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
Joshua Casey 2023-01-17 13:27:08 -06:00
parent f494c61790
commit 6156fdf175

View File

@ -1715,7 +1715,11 @@ func TestSupervisorLogin_Browser(t *testing.T) {
func wantGroupsInAdditionalClaimsIfGroupsExist(additionalClaims map[string]interface{}, wantGroupsAdditionalClaimName string, wantGroups []string) map[string]interface{} {
if len(wantGroups) > 0 {
additionalClaims[wantGroupsAdditionalClaimName] = wantGroups
var wantGroupsAnyType []interface{}
for _, group := range wantGroups {
wantGroupsAnyType = append(wantGroupsAnyType, group)
}
additionalClaims[wantGroupsAdditionalClaimName] = wantGroupsAnyType
}
return additionalClaims
}