mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:57:31 +00:00
feat: select idp and auto register (#2336)
* faet: auto regsiter config on idp * feat: auto register on login * feat: auto register on register * feat: redirect to selected identity provider * fix: test * fix: test * fix: user by id request org id * fix: migration version and test Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -50,8 +50,9 @@ func TestCommandSide_AddIDPConfig(t *testing.T) {
|
||||
args: args{
|
||||
ctx: context.Background(),
|
||||
config: &domain.IDPConfig{
|
||||
Name: "name1",
|
||||
StylingType: domain.IDPConfigStylingTypeGoogle,
|
||||
Name: "name1",
|
||||
StylingType: domain.IDPConfigStylingTypeGoogle,
|
||||
AutoRegister: true,
|
||||
OIDCConfig: &domain.OIDCIDPConfig{
|
||||
ClientID: "clientid1",
|
||||
Issuer: "issuer",
|
||||
@@ -96,6 +97,7 @@ func TestCommandSide_AddIDPConfig(t *testing.T) {
|
||||
"name1",
|
||||
domain.IDPConfigTypeOIDC,
|
||||
domain.IDPConfigStylingTypeGoogle,
|
||||
true,
|
||||
),
|
||||
),
|
||||
eventFromEventPusher(
|
||||
@@ -128,8 +130,9 @@ func TestCommandSide_AddIDPConfig(t *testing.T) {
|
||||
ctx: context.Background(),
|
||||
resourceOwner: "org1",
|
||||
config: &domain.IDPConfig{
|
||||
Name: "name1",
|
||||
StylingType: domain.IDPConfigStylingTypeGoogle,
|
||||
Name: "name1",
|
||||
StylingType: domain.IDPConfigStylingTypeGoogle,
|
||||
AutoRegister: true,
|
||||
OIDCConfig: &domain.OIDCIDPConfig{
|
||||
ClientID: "clientid1",
|
||||
Issuer: "issuer",
|
||||
@@ -148,10 +151,11 @@ func TestCommandSide_AddIDPConfig(t *testing.T) {
|
||||
AggregateID: "org1",
|
||||
ResourceOwner: "org1",
|
||||
},
|
||||
IDPConfigID: "config1",
|
||||
Name: "name1",
|
||||
StylingType: domain.IDPConfigStylingTypeGoogle,
|
||||
State: domain.IDPConfigStateActive,
|
||||
IDPConfigID: "config1",
|
||||
Name: "name1",
|
||||
StylingType: domain.IDPConfigStylingTypeGoogle,
|
||||
State: domain.IDPConfigStateActive,
|
||||
AutoRegister: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -260,6 +264,7 @@ func TestCommandSide_ChangeIDPConfig(t *testing.T) {
|
||||
"name1",
|
||||
domain.IDPConfigTypeOIDC,
|
||||
domain.IDPConfigStylingTypeGoogle,
|
||||
true,
|
||||
),
|
||||
),
|
||||
eventFromEventPusher(
|
||||
@@ -297,9 +302,10 @@ func TestCommandSide_ChangeIDPConfig(t *testing.T) {
|
||||
ctx: context.Background(),
|
||||
resourceOwner: "org1",
|
||||
config: &domain.IDPConfig{
|
||||
IDPConfigID: "config1",
|
||||
Name: "name2",
|
||||
StylingType: domain.IDPConfigStylingTypeUnspecified,
|
||||
IDPConfigID: "config1",
|
||||
Name: "name2",
|
||||
StylingType: domain.IDPConfigStylingTypeUnspecified,
|
||||
AutoRegister: true,
|
||||
},
|
||||
},
|
||||
res: res{
|
||||
@@ -308,10 +314,11 @@ func TestCommandSide_ChangeIDPConfig(t *testing.T) {
|
||||
AggregateID: "org1",
|
||||
ResourceOwner: "org1",
|
||||
},
|
||||
IDPConfigID: "config1",
|
||||
Name: "name2",
|
||||
StylingType: domain.IDPConfigStylingTypeUnspecified,
|
||||
State: domain.IDPConfigStateActive,
|
||||
IDPConfigID: "config1",
|
||||
Name: "name2",
|
||||
StylingType: domain.IDPConfigStylingTypeUnspecified,
|
||||
State: domain.IDPConfigStateActive,
|
||||
AutoRegister: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user