Class OAuth2Utils (1.32.0)

public class 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

public static final HttpTransportFactory HTTP_TRANSPORT_FACTORY
Field Value
Type Description
HttpTransportFactory

TOKEN_ENDPOINT_RETRYABLE_STATUS_CODES

public static final Set<Integer> TOKEN_ENDPOINT_RETRYABLE_STATUS_CODES
Field Value
Type Description
Set<Integer>

TOKEN_EXCHANGE_URL_FORMAT

public static final String TOKEN_EXCHANGE_URL_FORMAT
Field Value
Type Description
String

TOKEN_TYPE_ACCESS_BOUNDARY_INTERMEDIARY_TOKEN

public static final String TOKEN_TYPE_ACCESS_BOUNDARY_INTERMEDIARY_TOKEN
Field Value
Type Description
String

TOKEN_TYPE_ACCESS_TOKEN

public static final String TOKEN_TYPE_ACCESS_TOKEN
Field Value
Type Description
String

Static Methods

privateKeyFromPkcs8(String privateKeyPkcs8)

public static PrivateKey privateKeyFromPkcs8(String privateKeyPkcs8)

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.