From c6aff229ae1d2f9a5a20e154e542ace2100e0475 Mon Sep 17 00:00:00 2001 From: HaimKortovich Date: Mon, 20 Apr 2026 12:55:58 -0500 Subject: [PATCH] add applicationtype and add application id in update --- internal/controller/oidcapp_controller.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/controller/oidcapp_controller.go b/internal/controller/oidcapp_controller.go index bc5d1b2..c2b2061 100644 --- a/internal/controller/oidcapp_controller.go +++ b/internal/controller/oidcapp_controller.go @@ -156,6 +156,7 @@ func (wr *wrappedOIDCAppReconciler) Reconcile(ctx context.Context, ztdClient *cl ProjectId: *project.Status.ProjectId, ApplicationType: &application.CreateApplicationRequest_OidcConfiguration{ OidcConfiguration: &application.CreateOIDCApplicationRequest{ + ApplicationType: application.OIDCApplicationType(application.OIDCApplicationType_value[wr.OIDCApp.Spec.AppType]), RedirectUris: wr.OIDCApp.Spec.RedirectUris, ResponseTypes: responseTypes, GrantTypes: grantTypes, @@ -203,10 +204,12 @@ func (wr *wrappedOIDCAppReconciler) Reconcile(ctx context.Context, ztdClient *cl } else { _, err := ztdClient.ApplicationServiceV2().UpdateApplication(ctx, &application.UpdateApplicationRequest{ - Name: wr.OIDCApp.Name, - ProjectId: *project.Status.ProjectId, + Name: wr.OIDCApp.Name, + ProjectId: *project.Status.ProjectId, + ApplicationId: *appid, ApplicationType: &application.UpdateApplicationRequest_OidcConfiguration{ OidcConfiguration: &application.UpdateOIDCApplicationConfigurationRequest{ + ApplicationType: ptr.To(application.OIDCApplicationType(application.OIDCApplicationType_value[wr.OIDCApp.Spec.AppType])), RedirectUris: wr.OIDCApp.Spec.RedirectUris, ResponseTypes: responseTypes, GrantTypes: grantTypes,