From 1a7541431536b329f83fbc885ca30d4d83c98749 Mon Sep 17 00:00:00 2001 From: Stefan Benz <46600784+stebenz@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:26:28 +0200 Subject: [PATCH] fix: add apple as identity provider type to settings v2 api (#8472) # Which Problems Are Solved Apple is not availabe as IDP type in the settings v2 API. # How the Problems Are Solved Add Apple as type. # Additional Changes None # Additional Context None Co-authored-by: Max Peintner --- internal/api/grpc/settings/v2/settings_converter.go | 2 ++ internal/api/grpc/settings/v2/settings_converter_test.go | 4 ++++ proto/zitadel/settings/v2/login_settings.proto | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/api/grpc/settings/v2/settings_converter.go b/internal/api/grpc/settings/v2/settings_converter.go index 848ea3e14a..222e548d1b 100644 --- a/internal/api/grpc/settings/v2/settings_converter.go +++ b/internal/api/grpc/settings/v2/settings_converter.go @@ -216,6 +216,8 @@ func idpTypeToPb(idpType domain.IDPType) settings.IdentityProviderType { return settings.IdentityProviderType_IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED case domain.IDPTypeGoogle: return settings.IdentityProviderType_IDENTITY_PROVIDER_TYPE_GOOGLE + case domain.IDPTypeApple: + return settings.IdentityProviderType_IDENTITY_PROVIDER_TYPE_APPLE case domain.IDPTypeSAML: return settings.IdentityProviderType_IDENTITY_PROVIDER_TYPE_SAML default: diff --git a/internal/api/grpc/settings/v2/settings_converter_test.go b/internal/api/grpc/settings/v2/settings_converter_test.go index 75785c47b8..40c381986a 100644 --- a/internal/api/grpc/settings/v2/settings_converter_test.go +++ b/internal/api/grpc/settings/v2/settings_converter_test.go @@ -466,6 +466,10 @@ func Test_idpTypeToPb(t *testing.T) { args: args{domain.IDPTypeGoogle}, want: settings.IdentityProviderType_IDENTITY_PROVIDER_TYPE_GOOGLE, }, + { + args: args{domain.IDPTypeApple}, + want: settings.IdentityProviderType_IDENTITY_PROVIDER_TYPE_APPLE, + }, { args: args{domain.IDPTypeSAML}, want: settings.IdentityProviderType_IDENTITY_PROVIDER_TYPE_SAML, diff --git a/proto/zitadel/settings/v2/login_settings.proto b/proto/zitadel/settings/v2/login_settings.proto index d7d41a8a90..ca004288fe 100644 --- a/proto/zitadel/settings/v2/login_settings.proto +++ b/proto/zitadel/settings/v2/login_settings.proto @@ -148,5 +148,6 @@ enum IdentityProviderType { IDENTITY_PROVIDER_TYPE_GITLAB = 8; IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED = 9; IDENTITY_PROVIDER_TYPE_GOOGLE = 10; - IDENTITY_PROVIDER_TYPE_SAML=11; + IDENTITY_PROVIDER_TYPE_SAML = 11; + IDENTITY_PROVIDER_TYPE_APPLE = 12; }