Class A3LAuth

java.lang.Object
com.amazon.A3L.authentication.A3LAuth

public class A3LAuth extends Object
Initialization class for A3L Authentication library. This class initiates AppAuth by creating AuthorizationServiceConfiguration and helps in identifying the current device.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getCurrentService(Context context)
    Method to get the current service, GoogleSignIn or AppAuth depending on current device or developer's choice
    static void
    init(String clientId)
    Base method to initialize the AppAuth for A3L to support Google Authentication.
    static void
    init(String clientId, boolean defaultToAppAuth)
    Base method to initialize the AppAuth for A3L to support Google Authentication and for setting up AppAuth as default across all devices

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • A3LAuth

      public A3LAuth()
  • Method Details

    • init

      public static void init(@NonNull String clientId) throws APIException
      Base method to initialize the AppAuth for A3L to support Google Authentication. The client id is required by the AppAuth for authentication.
      Parameters:
      clientId - : Android client id for the current app
      Throws:
      APIException
    • init

      public static void init(@NonNull String clientId, boolean defaultToAppAuth) throws APIException
      Base method to initialize the AppAuth for A3L to support Google Authentication and for setting up AppAuth as default across all devices
      Parameters:
      clientId - : Android client id for the current app
      defaultToAppAuth - : boolean representing if the developer wishes to use AppAuth as default
      Throws:
      APIException
    • getCurrentService

      public static String getCurrentService(@NonNull Context context)
      Method to get the current service, GoogleSignIn or AppAuth depending on current device or developer's choice
      Parameters:
      context - : Application Context representing the current app
      Returns:
      String: Current service in use for the app.