@@ -231,6 +231,53 @@ public Zitadel(Authenticator authenticator) {
231231 });
232232 }
233233
234+ public Zitadel (Authenticator authenticator , TransportOptions transportOptions ) {
235+ this (
236+ authenticator ,
237+ transportOptions ,
238+ apiClient -> {
239+ // Dummy lambda that does nothing, can add default behavior here if needed
240+ });
241+ }
242+
243+ public Zitadel (Authenticator authenticator , TransportOptions transportOptions , Consumer <ApiClient > mutateApiClient ) {
244+ this .apiClient = new ApiClient (authenticator , transportOptions );
245+
246+ if (mutateApiClient != null ) {
247+ mutateApiClient .accept (this .apiClient );
248+ }
249+
250+ this .betaProjects = new BetaProjectServiceApi (apiClient );
251+ this .betaApps = new BetaAppServiceApi (apiClient );
252+ this .betaOidc = new BetaOidcServiceApi (apiClient );
253+ this .betaUsers = new BetaUserServiceApi (apiClient );
254+ this .betaOrganizations = new BetaOrganizationServiceApi (apiClient );
255+ this .betaSettings = new BetaSettingsServiceApi (apiClient );
256+ this .betaPermissions = new BetaInternalPermissionServiceApi (apiClient );
257+ this .betaAuthorizations = new BetaAuthorizationServiceApi (apiClient );
258+ this .betaSessions = new BetaSessionServiceApi (apiClient );
259+ this .betaInstance = new BetaInstanceServiceApi (apiClient );
260+ this .betaTelemetry = new BetaTelemetryServiceApi (apiClient );
261+ this .betaFeatures = new BetaFeatureServiceApi (apiClient );
262+ this .betaWebkeys = new BetaWebKeyServiceApi (apiClient );
263+ this .betaActions = new BetaActionServiceApi (apiClient );
264+ this .actions = new ActionServiceApi (apiClient );
265+ this .applications = new ApplicationServiceApi (apiClient );
266+ this .authorizations = new AuthorizationServiceApi (apiClient );
267+ this .users = new UserServiceApi (apiClient );
268+ this .sessions = new SessionServiceApi (apiClient );
269+ this .oidc = new OidcServiceApi (apiClient );
270+ this .features = new FeatureServiceApi (apiClient );
271+ this .idps = new IdentityProviderServiceApi (apiClient );
272+ this .instances = new InstanceServiceApi (apiClient );
273+ this .internalPermissions = new InternalPermissionServiceApi (apiClient );
274+ this .organizations = new OrganizationServiceApi (apiClient );
275+ this .projects = new ProjectServiceApi (apiClient );
276+ this .settings = new SettingsServiceApi (apiClient );
277+ this .saml = new SamlServiceApi (apiClient );
278+ this .webkeys = new WebKeyServiceApi (apiClient );
279+ }
280+
234281 public Zitadel (Authenticator authenticator , Consumer <ApiClient > mutateApiClient ) {
235282 this .apiClient = new ApiClient (authenticator );
236283
@@ -283,6 +330,18 @@ public static Zitadel withAccessToken(String host, String accessToken) {
283330 return new Zitadel (new PersonalAccessTokenAuthenticator (host , accessToken ));
284331 }
285332
333+ /**
334+ * Initialize the SDK with a Personal Access Token (PAT) and custom transport options.
335+ *
336+ * @param host API URL.
337+ * @param accessToken Personal Access Token for Bearer authentication.
338+ * @param transportOptions Transport options for HTTP connections.
339+ * @return Configured Zitadel client instance.
340+ */
341+ public static Zitadel withAccessToken (String host , String accessToken , TransportOptions transportOptions ) {
342+ return new Zitadel (new PersonalAccessTokenAuthenticator (host , accessToken ), transportOptions );
343+ }
344+
286345 /**
287346 * Initialize the SDK using OAuth2 Client Credentials flow.
288347 *
@@ -299,6 +358,21 @@ public static Zitadel withClientCredentials(String host, String clientId, String
299358 ClientCredentialsAuthenticator .builder (host , clientId , clientSecret ).build ());
300359 }
301360
361+ /**
362+ * Initialize the SDK using OAuth2 Client Credentials flow with custom transport options.
363+ *
364+ * @param host API URL.
365+ * @param clientId OAuth2 client identifier.
366+ * @param clientSecret OAuth2 client secret.
367+ * @param transportOptions Transport options for HTTP connections.
368+ * @return Configured Zitadel client instance with token auto-refresh.
369+ */
370+ public static Zitadel withClientCredentials (String host , String clientId , String clientSecret , TransportOptions transportOptions ) {
371+ return new Zitadel (
372+ ClientCredentialsAuthenticator .builder (host , clientId , clientSecret , transportOptions ).build (),
373+ transportOptions );
374+ }
375+
302376 /**
303377 * Initialize the SDK via Private Key JWT assertion.
304378 *
@@ -331,6 +405,36 @@ public static Zitadel withPrivateKey(String host, java.io.InputStream inputStrea
331405 return new Zitadel (WebTokenAuthenticator .fromJson (host , inputStream ));
332406 }
333407
408+ /**
409+ * Initialize the SDK via Private Key JWT assertion with custom transport options.
410+ *
411+ * @param host API URL.
412+ * @param keyFile Path to service account JSON or PEM key file.
413+ * @param transportOptions Transport options for HTTP connections.
414+ * @return Configured Zitadel client instance using JWT assertion.
415+ */
416+ @ SuppressFBWarnings ({"PATH_TRAVERSAL_IN" , "THROWS_METHOD_THROWS_RUNTIMEEXCEPTION" })
417+ public static Zitadel withPrivateKey (String host , String keyFile , TransportOptions transportOptions ) {
418+ try (java .io .FileInputStream fis = new java .io .FileInputStream (keyFile )) {
419+ return withPrivateKey (host , fis , transportOptions );
420+ } catch (IOException e ) {
421+ throw new RuntimeException (
422+ "Unable to read key file at " + keyFile + ": " + e .getMessage (), e );
423+ }
424+ }
425+
426+ /**
427+ * Initialize the SDK via Private Key JWT assertion with custom transport options.
428+ *
429+ * @param host API URL.
430+ * @param inputStream Input stream containing service account JSON or PEM key data.
431+ * @param transportOptions Transport options for HTTP connections.
432+ * @return Configured Zitadel client instance using JWT assertion.
433+ */
434+ public static Zitadel withPrivateKey (String host , java .io .InputStream inputStream , TransportOptions transportOptions ) {
435+ return new Zitadel (WebTokenAuthenticator .fromJson (host , inputStream , transportOptions ), transportOptions );
436+ }
437+
334438 /**
335439 * Gets the underlying API client. Recommended over direct field access for testability.
336440 *
0 commit comments