public final class SimpleSignInService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SDK_VERSION |
Constructor and Description |
---|
SimpleSignInService() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getSDKMode()
This API will return what mode the SDK is running in.
|
static RequestId |
getUserAndLinks(java.lang.String identityProviderName)
Initiates a request to retrieve the link data available at Amazon of the currently logged-in user.
|
static RequestId |
linkUserAccount(LinkUserAccountRequest linkUserAccountRequest)
Initiates a request to link the user's 3P account with Amazon account.
|
static RequestId |
recordMetricEvent(SSIEventRequest ssiEventRequest)
This API will be triggered in the case of any event that needs to be recorded for metric publishing.
|
static void |
registerResponseHandler(android.content.Context appContext,
ISimpleSignInResponseHandler responseHandler)
Before calling of the service APIs below, developers are expected to create an instance
of
ISimpleSignInResponseHandler and register along with the application context
by calling this method. |
static RequestId |
showLoginSelection(java.util.Map<java.lang.String,java.lang.String> loginNames)
Initiates a request to show list of links available and allow the user to choose from.
|
public static final java.lang.String SDK_VERSION
public static void registerResponseHandler(android.content.Context appContext, ISimpleSignInResponseHandler responseHandler)
ISimpleSignInResponseHandler
and register along with the application context
by calling this method. If any of the APIs is called before invoking this method, request
will not be honored and IllegalStateException will be thrown.appContext
- application contextresponseHandler
- an implementation instance of ISimpleSignInResponseHandler
to receive callback responses.public static RequestId getUserAndLinks(java.lang.String identityProviderName)
ISimpleSignInResponseHandler.onGetUserAndLinksResponse(GetUserAndLinksResponse)
identityProviderName
- name of the identity provider.public static RequestId linkUserAccount(LinkUserAccountRequest linkUserAccountRequest)
ISimpleSignInResponseHandler.onLinkUserAccountResponse(LinkUserAccountResponse)
linkUserAccountRequest
- request object to link user's 3p account with Amazon accountpublic static RequestId showLoginSelection(java.util.Map<java.lang.String,java.lang.String> loginNames)
ISimpleSignInResponseHandler.onShowLoginSelectionResponse(ShowLoginSelectionResponse)
loginNames
- map contains the user recognisable identifier and corresponding linkId.public static java.lang.String getSDKMode()
registerResponseHandler(Context, ISimpleSignInResponseHandler)
public static RequestId recordMetricEvent(SSIEventRequest ssiEventRequest)
registerResponseHandler(Context, ISimpleSignInResponseHandler)