Class SpannerOmniCredentials (6.119.0)

public class SpannerOmniCredentials extends GoogleCredentials

Credentials implementation for Spanner Omni. Uses the OPAQUE protocol to authenticate and fetches short-lived access tokens.

Inheritance

java.lang.Object > com.google.auth.Credentials > com.google.auth.oauth2.OAuth2Credentials > com.google.auth.oauth2.GoogleCredentials > SpannerOmniCredentials

Static Methods

convertToSecretBytes(char[] passwordChars)

public static SecretBytes convertToSecretBytes(char[] passwordChars)
Parameter
Name Description
passwordChars char[]
Returns
Type Description
com.google.crypto.tink.util.SecretBytes

Constructors

SpannerOmniCredentials(String username, SecretBytes password, String target)

public SpannerOmniCredentials(String username, SecretBytes password, String target)
Parameters
Name Description
username String
password com.google.crypto.tink.util.SecretBytes
target String

Methods

initChannel(boolean usePlainText, SslContext sslContext)

public void initChannel(boolean usePlainText, SslContext sslContext)
Parameters
Name Description
usePlainText boolean
sslContext io.grpc.netty.shaded.io.netty.handler.ssl.SslContext

refreshAccessToken()

public AccessToken refreshAccessToken()
Returns
Type Description
com.google.auth.oauth2.AccessToken
Overrides
com.google.auth.oauth2.OAuth2Credentials.refreshAccessToken()
Exceptions
Type Description
IOException