Interface ISimpleSignInService
interface ISimpleSignInService
Extends com.amazon.apmf.IStandard
Amazon Simple Sign-In APIs to create and use 3P app account link with Amazon for seamless sign in experience to apps.
Methods
registerResponseListener()
Registers the response listener to receive callback for other SDK APIs. This method should be invoked before calling any other API/method in the service.voidregisterResponseListener(ISimpleSignInResponseListener*responseListener)
Parameters
responseListener
ISimpleSignInResponseListener* — Required
to be used for triggering the response callback.
Throws
InvalidArgumentError— if parameter validation fails.
getUserAndLinks()
Method exposed for the getUserAndLinks API. Initiates a request to retrieve the link data available at Amazon of the currently logged-in Amazon user. When the response is available, callback method onGetUserAndLinksResponse is invoked.stringgetUserAndLinks(stringidentityProviderName)
Parameters
identityProviderName
string — Required
IDP name used by the app
Returns
string
unique request id generated for the request
Throws
InvalidArgumentError— if parameter validation fails or ResponseListener is not registered
linkUserAccount()
Method exposed for the linkUserAccount API. Initiates a request to link the user’s 3P account with Amazon account. When the response is available, callback method onLinkUserAccountResponse is invokedstringlinkUserAccount(LinkUserAccountRequest*request)
Parameters
request
LinkUserAccountRequest* — Required
object to link user’s 3p account with Amazon account
Returns
string
unique request id generated for the request
Throws
InvalidArgumentError— if parameter validation fails or ResponseListener is not registered
showLoginSelection()
Method exposed for the showLoginSelection API. Initiates a request to show list of links available and allow the user to choose from. When the user makes a selection, callback method onShowLoginSelectionResponse is invokedstringshowLoginSelection(LoginName[]loginNames)
Parameters
loginNames
LoginName[] — Required
map contains the user recognisable identifier and corresponding linkId
Returns
string
unique request id generated for the request
Throws
InvalidArgumentError— if parameter validation fails or ResponseListener is not registered
recordMetricEvent()
This API will be triggered in the case of any event that needs to be recorded for metric publishing. Before calling this API, you should register the app context and response listener implementation by callingstringrecordMetricEvent(SSIEventRequest*request)
Parameters
request
SSIEventRequest* — Required
object for recordMetricEvent API
Returns
string
unique request id generated for the request
Throws
InvalidArgumentError— if parameter validation fails or ResponseListener is not registered

