Skip to content

Commit f87bb27

Browse files
committed
Add backwards-compatible 2-param OAuthAuthenticator constructor
Preserve the original (OpenId, Scope) constructor signature by delegating to the new 3-param overload with null transport options.
1 parent d192f6b commit f87bb27

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎src/main/java/com/zitadel/auth/OAuthAuthenticator.java‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,24 @@ public abstract class OAuthAuthenticator extends Authenticator {
4242
@Nullable
4343
protected volatile Token token;
4444

45+
/**
46+
* Constructs an OAuthAuthenticator.
47+
*
48+
* @param openId The URL of the OAuth2 token endpoint.
49+
* @param scope The scope for the token request.
50+
*/
51+
public OAuthAuthenticator(OpenId openId, Scope scope) {
52+
this(openId, scope, null);
53+
}
54+
4555
/**
4656
* Constructs an OAuthAuthenticator.
4757
*
4858
* @param openId The URL of the OAuth2 token endpoint.
4959
* @param scope The scope for the token request.
5060
* @param transportOptions Optional transport options for TLS, proxy, and headers.
5161
*/
52-
public OAuthAuthenticator(OpenId openId, Scope scope, TransportOptions transportOptions) {
62+
public OAuthAuthenticator(OpenId openId, Scope scope, @Nullable TransportOptions transportOptions) {
5363
super(openId.getHostEndpoint());
5464
this.scope = new Scope(scope);
5565
this.token = null;

0 commit comments

Comments
 (0)