Class OAuth2Utils (1.32.1)

publicclass OAuth2Utils

Internal utilities for the com.google.auth.oauth2 namespace.

These classes are marked public but should be treated effectively as internal classes only. They are not subject to any backwards compatibility guarantees and might change or be removed at any time. They are provided only as a convenience for other libraries within the com.google.auth family. Application developers should avoid using these classes directly; they are not part of the public API.

Inheritance

java.lang.Object > OAuth2Utils

Static Fields

HTTP_TRANSPORT_FACTORY

publicstaticfinalHttpTransportFactoryHTTP_TRANSPORT_FACTORY
Field Value
Type Description
HttpTransportFactory

TOKEN_ENDPOINT_RETRYABLE_STATUS_CODES

publicstaticfinalSet<Integer>TOKEN_ENDPOINT_RETRYABLE_STATUS_CODES
Field Value
Type Description
Set<Integer>

TOKEN_EXCHANGE_URL_FORMAT

publicstaticfinalStringTOKEN_EXCHANGE_URL_FORMAT
Field Value
Type Description
String

TOKEN_TYPE_ACCESS_BOUNDARY_INTERMEDIARY_TOKEN

publicstaticfinalStringTOKEN_TYPE_ACCESS_BOUNDARY_INTERMEDIARY_TOKEN
Field Value
Type Description
String

TOKEN_TYPE_ACCESS_TOKEN

publicstaticfinalStringTOKEN_TYPE_ACCESS_TOKEN
Field Value
Type Description
String

Static Methods

privateKeyFromPkcs8(String privateKeyPkcs8)

publicstaticPrivateKeyprivateKeyFromPkcs8(StringprivateKeyPkcs8)

Converts a PKCS#8 string to an RSA private key.

Parameter
Name Description
privateKeyPkcs8 String

the PKCS#8 string.

Returns
Type Description
PrivateKey

the RSA private key.

Exceptions
Type Description
IOException

if the PKCS#8 data is invalid or if an unexpected exception occurs during key creation.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.