public class UserContextDataProvider
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VERSION |
| Modifier | Constructor and Description |
|---|---|
protected |
UserContextDataProvider(ContextDataAggregator aggregator,
SignatureGenerator signatureGenerator)
Protected constructor to instantiate a class object for unit testing.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEncodedContextData(android.content.Context context,
java.lang.String username,
java.lang.String userPoolId,
java.lang.String signatureSecret)
It gets aggregated user context data, adds signature to it and provides
it in Base64 encoded form.
|
protected java.lang.String |
getEncodedResponse(org.json.JSONObject jsonResponse)
Protected to allow overriding in unit test.
|
static UserContextDataProvider |
getInstance() |
protected java.lang.String |
getTimestamp()
Protected to allow overriding in unit test.
|
public static final java.lang.String VERSION
protected UserContextDataProvider(ContextDataAggregator aggregator, SignatureGenerator signatureGenerator)
public static UserContextDataProvider getInstance()
public java.lang.String getEncodedContextData(android.content.Context context,
java.lang.String username,
java.lang.String userPoolId,
java.lang.String signatureSecret)
context - android application contextusername - username for the useruserPoolId - cognito userpoolId for the applicationsignatureSecret - secret key used while generating signature. For now, this
would be application clientId.protected java.lang.String getTimestamp()
protected java.lang.String getEncodedResponse(org.json.JSONObject jsonResponse)