CredentialProvider
App implementation of CredentialProvider.
Reads credentials from CredentialStorage (backed by EncryptedSharedPreferences) so that the SDK's interceptors always receive the most recent values without the SDK needing to store or manage credentials itself.
The API key is only returned when there is no valid access token, ensuring that Basic Auth headers are attached only during the token-exchange phase and Bearer token is used thereafter.
Constructors
Functions
Returns the current Bearer access token from CredentialStorage, or an empty string if it has expired or has not yet been obtained.
Returns the API user ID from static app configuration.
Returns a per-operation callback URL by appending operation to SampleConfig.callbackBaseUrl, giving each initiation endpoint its own callback path (e.g. <base>/requesttopay, <base>/deposit). Returns an empty string when no base URL is configured, so the X-Callback-Url header is omitted entirely until a callback base URL is set.
Returns the current OAuth2 (consent) access token from CredentialStorage, or an empty string if it has expired or has not yet been obtained. Used to authenticate OAuth2 endpoints such as GET /{productType}/oauth2/{apiVersion}/userinfo.