getASAPPRequestContext

abstract fun getASAPPRequestContext(user: ASAPPUser, refreshContext: Boolean = false): Map<String, Any>?

Called when making a request that may require user sensitive data. Called on a background thread.

This function can return a map like the following example: return mapOf( // The authentication object (required for logged in users) "Auth" to mapOf( "Token" to user.token, "Header" to mapOf("header_is" to "forty two"), "Body" to emptyMap(), "Cookies" to emptyMap() ), // Other optional data "answer" to 42 )

Return

Map The user context, with the authentication token if any.

Parameters

user

The current user set on the SDK

refreshContext

true when the context returned previously is now stale. The client app should refresh the auth credentials and return the updated values. This method is called on a background thread so the refresh should happen synchronously.