Authentication

Login

Use this line to open authentication webview

GtvSdk.INSTANCE.showLogin(new GtvCallback() {
   @Override
   public void onFinish(GtvPublicResponse gtvResponse) {

   }
});

The GtvPublicResponse instance has these information:

{
   "type": "type", #type of authentication
   "register": 0, #new register or returning user
   "uuid": "a1b2c3..." #user id
}

Logout

Use this line to logout

GTVSDK.getInstance().logOut();

Get Token

Use this line to get authentication token

GTVSDK.getInstance().getAuthToken();

Use this line to get payment token

GTVSDK.getInstance().getAuthPaymentToken();

Use this line to refresh authentication token

GTVSDK.getInstance().refreshAuthToken();

Use this line to refresh payment token

GTVSDK.getInstance().refreshAuthPaymentToken();