public class SessionUtil extends Object
| Constructor and Description |
|---|
SessionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeSession(SFLoginInput loginInput)
Close a session
|
static void |
deleteIdTokenCache()
Delete the id token cache
|
static Map<String,Object> |
getCommonParams(com.fasterxml.jackson.databind.JsonNode paramsNode)
Helper function to parse a JsonNode from a GS response
containing CommonParameters, emitting an EnumMap of parameters
|
static SFLoginOutput |
issueSession(SFLoginInput loginInput)
Issue a session
|
static SFLoginOutput |
openSession(SFLoginInput loginInput)
Open a new session
|
static SFLoginOutput |
renewSession(SFLoginInput loginInput)
Renew a session.
|
static void |
updateSfDriverParamValues(Map<String,Object> parameters,
SFSession session) |
protected static final String SF_PATH_AUTHENTICATOR_REQUEST
public static final String SF_QUERY_SESSION_DELETE
public static final String SF_HEADER_AUTHORIZATION
public static final String SF_HEADER_BASIC_AUTHTYPE
public static final String SF_HEADER_SNOWFLAKE_AUTHTYPE
public static final String SF_HEADER_TOKEN_TAG
public static final String CLIENT_STORE_TEMPORARY_CREDENTIAL
public static final String SERVICE_NAME
public static final String CLIENT_IN_BAND_TELEMETRY_ENABLED
public static final String CLIENT_OUT_OF_BAND_TELEMETRY_ENABLED
public static final String CLIENT_RESULT_COLUMN_CASE_INSENSITIVE
public static final String JDBC_RS_COLUMN_CASE_INSENSITIVE
public static final String CLIENT_RESULT_CHUNK_SIZE_JVM
public static final String CLIENT_RESULT_CHUNK_SIZE
public static final String CLIENT_MEMORY_LIMIT_JVM
public static final String CLIENT_MEMORY_LIMIT
public static final String CLIENT_PREFETCH_THREADS_JVM
public static final String CLIENT_PREFETCH_THREADS
public static final String CLIENT_ENABLE_CONSERVATIVE_MEMORY_USAGE_JVM
public static final String CLIENT_ENABLE_CONSERVATIVE_MEMORY_USAGE
public static final String CACHE_FILE_NAME
public static final String OCSP_FAIL_OPEN_JVM
public static final String OCSP_FAIL_OPEN
public static final String CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY
public static final String CLIENT_SFSQL
public static long DEFAULT_CLIENT_MEMORY_LIMIT
public static int DEFAULT_CLIENT_PREFETCH_THREADS
public static int DEFAULT_CLIENT_CHUNK_SIZE
public static int MIN_CLIENT_CHUNK_SIZE
public static int MAX_CLIENT_CHUNK_SIZE
public static SFLoginOutput openSession(SFLoginInput loginInput) throws SFException, SnowflakeSQLException
loginInput - login informationSFException - if unexpected uri syntaxSnowflakeSQLException - if failed to establish connection with snowflakepublic static void deleteIdTokenCache()
public static SFLoginOutput renewSession(SFLoginInput loginInput) throws SFException, SnowflakeSQLException
Use cases: - Session and Master tokens are provided. No Id token: - succeed in getting a new Session token. - fail and raise SnowflakeReauthenticationRequest because Master token expires. Since no id token exists, the exception is thrown to the upstream. - Session and Id tokens are provided. No Master token: - fail and raise SnowflakeReauthenticationRequest and issue a new Session token - fail and raise SnowflakeReauthenticationRequest and fail to issue a new Session token as the
loginInput - login informationSFException - if unexpected uri informationSnowflakeSQLException - if failed to renew the sessionpublic static SFLoginOutput issueSession(SFLoginInput loginInput) throws SFException, SnowflakeSQLException
loginInput - login informationSFException - if unexpected uri informationSnowflakeSQLException - if failed to renew the sessionpublic static void closeSession(SFLoginInput loginInput) throws SFException, SnowflakeSQLException
loginInput - login informationSnowflakeSQLException - if failed to close sessionSFException - if failed to close sessionpublic static Map<String,Object> getCommonParams(com.fasterxml.jackson.databind.JsonNode paramsNode)
paramsNode - parameters in JSON formCopyright © 2019. All rights reserved.