get oidc configuration
All checks were successful
Build and Publish / build-release (push) Successful in 2m0s
All checks were successful
Build and Publish / build-release (push) Successful in 2m0s
This commit is contained in:
@@ -144,10 +144,11 @@ func (wr *wrappedOIDCAppReconciler) Reconcile(ctx context.Context, ztdClient *cl
|
|||||||
return fmt.Errorf("Error listing OIDCApps: %v", err)
|
return fmt.Errorf("Error listing OIDCApps: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(appList.Applications) > 0 {
|
|
||||||
fmt.Println(appList.Applications)
|
fmt.Println(appList.Applications)
|
||||||
|
|
||||||
|
if len(appList.Applications) > 0 {
|
||||||
appid = &appList.Applications[0].ApplicationId
|
appid = &appList.Applications[0].ApplicationId
|
||||||
clientid = &appList.Applications[0].GetApiConfiguration().ClientId
|
clientid = &appList.Applications[0].GetOidcConfiguration().ClientId
|
||||||
}
|
}
|
||||||
|
|
||||||
if appid == nil {
|
if appid == nil {
|
||||||
@@ -191,7 +192,7 @@ func (wr *wrappedOIDCAppReconciler) Reconcile(ctx context.Context, ztdClient *cl
|
|||||||
Namespace: wr.OIDCApp.Namespace,
|
Namespace: wr.OIDCApp.Namespace,
|
||||||
}
|
}
|
||||||
|
|
||||||
secretData := map[string][]byte{"clientSecret": []byte(resp.GetApiConfiguration().ClientSecret), "appId": []byte(resp.ApplicationId), "clientId": []byte(resp.GetApiConfiguration().ClientId)}
|
secretData := map[string][]byte{"clientSecret": []byte(resp.GetApiConfiguration().ClientSecret), "appId": []byte(resp.ApplicationId), "clientId": []byte(resp.GetOidcConfiguration().ClientId)}
|
||||||
secret, err := wr.Builder.BuildSecret(builder.SecretOpts{Immutable: false, Key: key, Data: secretData}, wr.OIDCApp)
|
secret, err := wr.Builder.BuildSecret(builder.SecretOpts{Immutable: false, Key: key, Data: secretData}, wr.OIDCApp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error building Secret: %v", err)
|
return fmt.Errorf("error building Secret: %v", err)
|
||||||
@@ -200,7 +201,7 @@ func (wr *wrappedOIDCAppReconciler) Reconcile(ctx context.Context, ztdClient *cl
|
|||||||
return fmt.Errorf("error creating Client-secret Secret: %v", err)
|
return fmt.Errorf("error creating Client-secret Secret: %v", err)
|
||||||
}
|
}
|
||||||
appid = &resp.ApplicationId
|
appid = &resp.ApplicationId
|
||||||
clientid = &resp.GetApiConfiguration().ClientId
|
clientid = &resp.GetOidcConfiguration().ClientId
|
||||||
} else {
|
} else {
|
||||||
_, err := ztdClient.ApplicationServiceV2().UpdateApplication(ctx,
|
_, err := ztdClient.ApplicationServiceV2().UpdateApplication(ctx,
|
||||||
&application.UpdateApplicationRequest{
|
&application.UpdateApplicationRequest{
|
||||||
|
|||||||
Reference in New Issue
Block a user