Class A3LSignInClient

java.lang.Object
com.amazon.A3L.authentication.api.signin.A3LSignInClient

public class A3LSignInClient extends Object
Provides abstraction over GoogleSignInClient and AppAuth client helper Holds the respective helper classes depending on the current service being used.
  • Constructor Summary

    Constructors
    Constructor
    Description
    A3LSignInClient(com.amazon.A3L.authentication.appauth.AppAuthSignInClientHelper appAuthSignInClientHelper)
     
    A3LSignInClient(com.amazon.A3L.authentication.googlesignin.GoogleSignInClientHelper googleSignInClientHelper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Intent
    Gets an Intent to start the Google Sign In flow by calling android.app.Activity#startActivityForResult(Intent, int).
    com.google.android.gms.tasks.Task<Void>
    Revokes access given to the current application.
    com.google.android.gms.tasks.Task<Void>
    Signs out the current signed-in user if any.

    Methods inherited from class java.lang.Object

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

    • A3LSignInClient

      public A3LSignInClient(@NonNull com.amazon.A3L.authentication.googlesignin.GoogleSignInClientHelper googleSignInClientHelper)
    • A3LSignInClient

      public A3LSignInClient(@NonNull com.amazon.A3L.authentication.appauth.AppAuthSignInClientHelper appAuthSignInClientHelper)
  • Method Details

    • getSignInIntent

      public Intent getSignInIntent()
      Gets an Intent to start the Google Sign In flow by calling android.app.Activity#startActivityForResult(Intent, int).
      Returns:
      The android.content.Intent used for start the sign-in flow.
    • signOut

      public com.google.android.gms.tasks.Task<Void> signOut()
      Signs out the current signed-in user if any. It also clears the account previously selected by the user and a future sign in attempt will require the user pick an account again.
      Returns:
      Task: A Task that may be used to check for failure, success or completion
    • revokeAccess

      public com.google.android.gms.tasks.Task<Void> revokeAccess()
      Revokes access given to the current application. Future sign-in attempts will require the user to re-consent to all requested scopes. Applications are required to provide users that are signed in with Google the ability to disconnect their Google account from the app. If the user deletes their account, you must delete the information that your app obtained from the Google APIs.
      Returns:
      Task: A Task that may be used to check for failure, success or completion