Package com.glideidentity
Class GlideClient
java.lang.Object
com.glideidentity.GlideClient
Entry point for the Glide SDK.
Provides access to authentication services for carrier-based phone verification.
Uses OAuth2 Client Credentials flow for API authentication.
Example:
GlideClient client = new GlideClient("client-id", "client-secret");
PrepareResponse response = client.magicalAuth.prepare(request);
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MagicalAuthAuthentication service for phone verification. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a client using credentials from environment variables.GlideClient(Config config) Creates a client with the provided configuration.GlideClient(String clientId, String clientSecret) Creates a client with the provided OAuth2 credentials. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the cached OAuth2 token, forcing a new fetch on next API call.Returns the logger instance.
-
Field Details
-
magicalAuth
Authentication service for phone verification.
-
-
Constructor Details
-
GlideClient
Creates a client with the provided configuration.- Parameters:
config- SDK configuration
-
GlideClient
Creates a client with the provided OAuth2 credentials.- Parameters:
clientId- OAuth2 Client IDclientSecret- OAuth2 Client Secret
-
GlideClient
public GlideClient()Creates a client using credentials from environment variables. Reads GLIDE_CLIENT_ID and GLIDE_CLIENT_SECRET.
-
-
Method Details
-
getLogger
Returns the logger instance. -
clearTokenCache
public void clearTokenCache()Clears the cached OAuth2 token, forcing a new fetch on next API call. Useful for handling authentication errors or testing.
-