Package com.glideidentity
Class Config
java.lang.Object
com.glideidentity.Config
Configuration for the Glide SDK.
OAuth2 credentials can be provided directly or loaded from environment variables:
- GLIDE_CLIENT_ID
- GLIDE_CLIENT_SECRET
-
Constructor Summary
ConstructorsConstructorDescriptionConfig()Creates configuration that loads settings from environment.Creates configuration with OAuth2 credentials.Creates configuration with OAuth2 credentials and custom base URL. -
Method Summary
Modifier and TypeMethodDescriptionintvoidsetBaseUrl(String baseUrl) voidsetClientId(String clientId) voidsetClientSecret(String clientSecret) voidsetLogFormat(String logFormat) voidsetLogger(Logger.LoggerInterface logger) voidsetLogLevel(String logLevel) voidsetTokenRefreshBuffer(int tokenRefreshBuffer) Sets the token refresh buffer in seconds.
-
Constructor Details
-
Config
Creates configuration with OAuth2 credentials and custom base URL.- Parameters:
clientId- OAuth2 Client IDclientSecret- OAuth2 Client SecretbaseUrl- API base URL
-
Config
Creates configuration with OAuth2 credentials. Base URL will be loaded from GLIDE_API_BASE_URL environment variable, or use the default if not set.- Parameters:
clientId- OAuth2 Client IDclientSecret- OAuth2 Client Secret
-
Config
public Config()Creates configuration that loads settings from environment. Credentials from GLIDE_CLIENT_ID and GLIDE_CLIENT_SECRET, base URL from GLIDE_API_BASE_URL.
-
-
Method Details
-
getClientId
-
setClientId
-
getClientSecret
-
setClientSecret
-
getBaseUrl
-
setBaseUrl
-
getTokenRefreshBuffer
public int getTokenRefreshBuffer() -
setTokenRefreshBuffer
public void setTokenRefreshBuffer(int tokenRefreshBuffer) Sets the token refresh buffer in seconds. Token will be refreshed this many seconds before expiry.- Parameters:
tokenRefreshBuffer- Seconds before expiry to refresh (default: 60)
-
getLogLevel
-
setLogLevel
-
getLogFormat
-
setLogFormat
-
getLogger
-
setLogger
-