mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
feat(login): use new IDP templates (#5315)
The login uses the new template based IDPs with backwards compatibility for old IDPs
This commit is contained in:
@@ -14,14 +14,14 @@ import (
|
||||
var (
|
||||
idpUserLinksQuery = regexp.QuoteMeta(`SELECT projections.idp_user_links3.idp_id,` +
|
||||
` projections.idp_user_links3.user_id,` +
|
||||
` projections.idps3.name,` +
|
||||
` projections.idp_templates2.name,` +
|
||||
` projections.idp_user_links3.external_user_id,` +
|
||||
` projections.idp_user_links3.display_name,` +
|
||||
` projections.idps3.type,` +
|
||||
` projections.idp_templates2.type,` +
|
||||
` projections.idp_user_links3.resource_owner,` +
|
||||
` COUNT(*) OVER ()` +
|
||||
` FROM projections.idp_user_links3` +
|
||||
` LEFT JOIN projections.idps3 ON projections.idp_user_links3.idp_id = projections.idps3.id AND projections.idp_user_links3.instance_id = projections.idps3.instance_id` +
|
||||
` LEFT JOIN projections.idp_templates2 ON projections.idp_user_links3.idp_id = projections.idp_templates2.id AND projections.idp_user_links3.instance_id = projections.idp_templates2.instance_id` +
|
||||
` AS OF SYSTEM TIME '-1 ms'`)
|
||||
idpUserLinksCols = []string{
|
||||
"idp_id",
|
||||
@@ -60,7 +60,7 @@ func Test_IDPUserLinkPrepares(t *testing.T) {
|
||||
"idp-name",
|
||||
"external-user-id",
|
||||
"display-name",
|
||||
domain.IDPConfigTypeJWT,
|
||||
domain.IDPTypeJWT,
|
||||
"ro",
|
||||
},
|
||||
},
|
||||
@@ -77,7 +77,7 @@ func Test_IDPUserLinkPrepares(t *testing.T) {
|
||||
IDPName: "idp-name",
|
||||
ProvidedUserID: "external-user-id",
|
||||
ProvidedUsername: "display-name",
|
||||
IDPType: domain.IDPConfigTypeJWT,
|
||||
IDPType: domain.IDPTypeJWT,
|
||||
ResourceOwner: "ro",
|
||||
},
|
||||
},
|
||||
@@ -114,7 +114,7 @@ func Test_IDPUserLinkPrepares(t *testing.T) {
|
||||
IDPName: "",
|
||||
ProvidedUserID: "external-user-id",
|
||||
ProvidedUsername: "display-name",
|
||||
IDPType: domain.IDPConfigTypeUnspecified,
|
||||
IDPType: domain.IDPTypeUnspecified,
|
||||
ResourceOwner: "ro",
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user