Class GlideClient

java.lang.Object
com.glideidentity.GlideClient

public class GlideClient extends Object
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 Details

    • magicalAuth

      public final MagicalAuth magicalAuth
      Authentication service for phone verification.
  • Constructor Details

    • GlideClient

      public GlideClient(Config config)
      Creates a client with the provided configuration.
      Parameters:
      config - SDK configuration
    • GlideClient

      public GlideClient(String clientId, String clientSecret)
      Creates a client with the provided OAuth2 credentials.
      Parameters:
      clientId - OAuth2 Client ID
      clientSecret - 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

      public Logger.LoggerInterface 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.