Package com.snowflake.ingest.streaming
Class AuthToken
java.lang.Object
com.snowflake.ingest.streaming.AuthToken
An authentication token and, optionally, when it expires. Immutable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithSpcsServiceToken(String spcsServiceToken) Returns a copy of this token that also carries an SPCS service token, for a client running in Snowpark Container Services.
-
Constructor Details
-
AuthToken
A token with no expiry, refreshed only after Snowflake rejects it with a 401 or 403.- Parameters:
authToken- the token, non-null and not blank
-
AuthToken
- Parameters:
authToken- the token, non-null and not blankexpiresAtEpochMillis- when the token expires, in epoch milliseconds on this host's clock. A time at or before now fails the refresh.
-
-
Method Details
-
withSpcsServiceToken
Returns a copy of this token that also carries an SPCS service token, for a client running in Snowpark Container Services.- Parameters:
spcsServiceToken- the SPCS service token, or null for none- Returns:
- the copy
-
getAuthToken
-
getExpiresAtEpochMillis
- Returns:
- when the token expires, in epoch milliseconds, or null if it has no expiry
-
getSpcsServiceToken
- Returns:
- the SPCS service token, or null if there is none
-