OIDC: add support for account claim maps (#1186)
This commit is contained in:
28 files changed
+1456
-200
No files matched your search
@@ -572,6 +572,10 @@ func TestCreate(t *testing.T) {
|
||||
lv, _ := structpb.NewList([]interface{}{"email", "profile"})
|
||||
return structpb.NewListValue(lv)
|
||||
}(),
|
||||
"account_claim_maps": func() *structpb.Value {
|
||||
lv, _ := structpb.NewList([]interface{}{"display_name=name", "oid=sub"})
|
||||
return structpb.NewListValue(lv)
|
||||
}(),
|
||||
}},
|
||||
}},
|
||||
idPrefix: oidc.AuthMethodPrefix + "_",
|
||||
@@ -600,6 +604,10 @@ func TestCreate(t *testing.T) {
|
||||
lv, _ := structpb.NewList([]interface{}{"email", "profile"})
|
||||
return structpb.NewListValue(lv)
|
||||
}(),
|
||||
"account_claim_maps": func() *structpb.Value {
|
||||
lv, _ := structpb.NewList([]interface{}{"display_name=name", "oid=sub"})
|
||||
return structpb.NewListValue(lv)
|
||||
}(),
|
||||
}},
|
||||
AuthorizedActions: oidcAuthorizedActions,
|
||||
AuthorizedCollectionActions: authorizedCollectionActions,
|
||||
@@ -989,7 +997,7 @@ func TestCreate(t *testing.T) {
|
||||
delete(tc.res.Item.Attributes.Fields, "callback_url")
|
||||
}
|
||||
}
|
||||
assert.Empty(cmp.Diff(got, tc.res, protocmp.Transform()), "CreateAuthMethod(%q) got response %q, wanted %q", tc.req, got, tc.res)
|
||||
assert.Empty(cmp.Diff(got, tc.res, protocmp.Transform(), protocmp.SortRepeatedFields(got)), "CreateAuthMethod(%q) got response %q, wanted %q", tc.req, got, tc.res)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user