Package com.glideapi
Class GlideClient
java.lang.Object
com.glideapi.GlideClient
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAvailable session management strategies -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MagicAuthClientfinal NumberVerifyClientfinal SimSwapClientfinal TelcoFinderClient -
Constructor Summary
ConstructorsConstructorDescriptionGlideClient(Types.GlideSdkSettings settings) Creates a GlideClient with automatic session management using ThreadLocal strategyGlideClient(Types.GlideSdkSettings settings, boolean autoSession, GlideClient.SessionManagement strategy) Creates a GlideClient with specified session managementGlideClient(String clientId, String clientSecret) GlideClient(String clientId, String clientSecret, boolean autoSession) Creates a GlideClient with manual session management (backward compatibility) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear any cached sessionsCreates a new OAuth session for API authentication.createSession(String scope) Creates a new OAuth session for API authentication with specified scopes.Creates a new session asynchronouslyGet the current session strategybooleanCheck if automatic session management is enabled
-
Field Details
-
telcoFinder
-
magicAuth
-
simSwap
-
numberVerify
-
-
Constructor Details
-
GlideClient
Creates a GlideClient with automatic session management using ThreadLocal strategy -
GlideClient
public GlideClient(Types.GlideSdkSettings settings, boolean autoSession, GlideClient.SessionManagement strategy) Creates a GlideClient with specified session management -
GlideClient
-
GlideClient
Creates a GlideClient with manual session management (backward compatibility) -
GlideClient
public GlideClient()
-
-
Method Details
-
createSession
Creates a new OAuth session for API authentication with specified scopes.- Parameters:
scope- Space-separated list of scopes to request- Returns:
- A new Session with an access token
- Throws:
Exception- if session creation fails
-
createSession
Creates a new OAuth session for API authentication. This is a helper method - users can call this directly or implement their own session management. Requests all available scopes.- Returns:
- A new Session with an access token
- Throws:
Exception- if session creation fails
-
createSessionAsync
Creates a new session asynchronously- Returns:
- CompletableFuture that will complete with a new Session
-
clearSessionCache
public void clearSessionCache()Clear any cached sessions -
getSessionStrategy
Get the current session strategy -
isAutoSession
public boolean isAutoSession()Check if automatic session management is enabled
-