public class SessionUtil extends Object
| Constructor and Description |
|---|
SessionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteIdTokenCache(String host,
String user)
Delete the id token cache
|
static void |
deleteMfaTokenCache(String host,
String user) |
static String |
generateJWTToken(PrivateKey privateKey,
String privateKeyFile,
String privateKeyFilePwd,
String accountName,
String userName)
Helper function to generate a JWT token
|
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 void |
resetOCSPUrlIfNecessary(String serverUrl)
Reset OCSP cache server if the snowflake server URL is for private link.
|
public 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 JDBC_CHUNK_DOWNLOADER_MAX_RETRY
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 CLIENT_CONSERVATIVE_MEMORY_ADJUST_STEP
public static final String OCSP_FAIL_OPEN_JVM
public static final String CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY
public static final String CLIENT_SFSQL
public static final String CLIENT_VALIDATE_DEFAULT_PARAMETERS
public static final String CLIENT_ENABLE_LOG_INFO_STATEMENT_PARAMETERS
public static final String CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX
public static final String CLIENT_METADATA_USE_SESSION_DATABASE
public static final String ENABLE_STAGE_S3_PRIVATELINK_FOR_US_EAST_1
public static long DEFAULT_CLIENT_MEMORY_LIMIT
public static int DEFAULT_CLIENT_PREFETCH_THREADS
public static int MIN_CLIENT_CHUNK_SIZE
public static int MAX_CLIENT_CHUNK_SIZE
public static void deleteIdTokenCache(String host, String user)
public static Map<String,Object> getCommonParams(com.fasterxml.jackson.databind.JsonNode paramsNode)
paramsNode - parameters in JSON formpublic static void resetOCSPUrlIfNecessary(String serverUrl) throws IOException
serverUrl - The Snowflake URL includes protocol such as "https://"IOExceptionpublic static String generateJWTToken(PrivateKey privateKey, String privateKeyFile, String privateKeyFilePwd, String accountName, String userName) throws SFException
privateKey - private keyprivateKeyFile - path to private key fileprivateKeyFilePwd - password for private key fileaccountName - account nameuserName - user nameSFException - if Snowflake error occursCopyright © 2022. All rights reserved.