Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
package com.google.auth.mtls;

import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.core.InternalApi;
import com.google.auth.http.HttpTransportFactory;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
Expand All @@ -45,6 +46,7 @@
* <p><b>Warning:</b> This class is considered internal and is not intended for direct use by
* library consumers. Its API and behavior may change without notice.
*/
@InternalApi
public class MtlsHttpTransportFactory implements HttpTransportFactory {
private final KeyStore mtlsKeyStore;

Expand All @@ -67,7 +69,7 @@
} catch (GeneralSecurityException e) {
// Wrap the checked exception in a RuntimeException because the HttpTransportFactory
// interface's create() method doesn't allow throwing checked exceptions.
throw new RuntimeException("Failed to initialize mTLS transport.", e);

Check warning on line 72 in oauth2_http/java/com/google/auth/mtls/MtlsHttpTransportFactory.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace generic exceptions with specific library exceptions or a custom exception.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-auth-library-java&issues=AZ0NEA5FEZhAYNnBMt2b&open=AZ0NEA5FEZhAYNnBMt2b&pullRequest=1903
}
}
}
2 changes: 2 additions & 0 deletions oauth2_http/java/com/google/auth/oauth2/OAuth2Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import com.google.api.client.util.PemReader;
import com.google.api.client.util.PemReader.Section;
import com.google.api.client.util.SecurityUtils;
import com.google.api.core.InternalApi;
import com.google.auth.http.AuthHttpConstants;
import com.google.auth.http.HttpTransportFactory;
import com.google.common.base.Strings;
Expand Down Expand Up @@ -78,6 +79,7 @@
* com.google.auth} family. Application developers should avoid using these classes directly; they
* are not part of the public API.
*/
@InternalApi
public class OAuth2Utils {

static final String SIGNATURE_ALGORITHM = "SHA256withRSA";
Expand Down
Loading