feat: allow skip of success page for native apps (#5627)

add possibility to return to callback directly after login without rendering the successful login page
This commit is contained in:
Livio Spring
2023-04-11 17:07:32 +02:00
parent 991a56341b
commit d25454b84b
32 changed files with 641 additions and 390 deletions

View File

@@ -169,6 +169,7 @@ func TestAddOIDCApp(t *testing.T) {
false,
0,
nil,
false,
),
},
},
@@ -325,7 +326,9 @@ func TestCommandSide_AddOIDCApplication(t *testing.T) {
true,
true,
time.Second*1,
[]string{"https://sub.test.ch"}),
[]string{"https://sub.test.ch"},
true,
),
),
},
uniqueConstraintsFromEventConstraint(project.NewAddApplicationUniqueConstraint("app", "project1")),
@@ -354,6 +357,7 @@ func TestCommandSide_AddOIDCApplication(t *testing.T) {
IDTokenUserinfoAssertion: true,
ClockSkew: time.Second * 1,
AdditionalOrigins: []string{"https://sub.test.ch"},
SkipNativeAppSuccessPage: true,
},
resourceOwner: "org1",
secretGenerator: GetMockSecretGenerator(t),
@@ -382,6 +386,7 @@ func TestCommandSide_AddOIDCApplication(t *testing.T) {
IDTokenUserinfoAssertion: true,
ClockSkew: time.Second * 1,
AdditionalOrigins: []string{"https://sub.test.ch"},
SkipNativeAppSuccessPage: true,
State: domain.AppStateActive,
Compliance: &domain.Compliance{},
},
@@ -558,7 +563,9 @@ func TestCommandSide_ChangeOIDCApplication(t *testing.T) {
true,
true,
time.Second*1,
[]string{"https://sub.test.ch"}),
[]string{"https://sub.test.ch"},
true,
),
),
),
),
@@ -585,6 +592,7 @@ func TestCommandSide_ChangeOIDCApplication(t *testing.T) {
IDTokenUserinfoAssertion: true,
ClockSkew: time.Second * 1,
AdditionalOrigins: []string{"https://sub.test.ch"},
SkipNativeAppSuccessPage: true,
},
resourceOwner: "org1",
},
@@ -629,7 +637,9 @@ func TestCommandSide_ChangeOIDCApplication(t *testing.T) {
true,
true,
time.Second*1,
[]string{"https://sub.test.ch"}),
[]string{"https://sub.test.ch"},
true,
),
),
),
expectPush(
@@ -666,6 +676,7 @@ func TestCommandSide_ChangeOIDCApplication(t *testing.T) {
IDTokenUserinfoAssertion: false,
ClockSkew: time.Second * 2,
AdditionalOrigins: []string{"https://sub.test.ch"},
SkipNativeAppSuccessPage: true,
},
resourceOwner: "org1",
},
@@ -692,6 +703,7 @@ func TestCommandSide_ChangeOIDCApplication(t *testing.T) {
IDTokenUserinfoAssertion: false,
ClockSkew: time.Second * 2,
AdditionalOrigins: []string{"https://sub.test.ch"},
SkipNativeAppSuccessPage: true,
Compliance: &domain.Compliance{},
State: domain.AppStateActive,
},
@@ -826,7 +838,9 @@ func TestCommandSide_ChangeOIDCApplicationSecret(t *testing.T) {
true,
true,
time.Second*1,
[]string{"https://sub.test.ch"}),
[]string{"https://sub.test.ch"},
false,
),
),
),
expectPush(
@@ -877,6 +891,7 @@ func TestCommandSide_ChangeOIDCApplicationSecret(t *testing.T) {
IDTokenUserinfoAssertion: true,
ClockSkew: time.Second * 1,
AdditionalOrigins: []string{"https://sub.test.ch"},
SkipNativeAppSuccessPage: false,
State: domain.AppStateActive,
},
},