CredentialStorage
Secure credential storage backed by EncryptedSharedPreferences.
Keys and values are encrypted using AES-256 with the master key stored in the Android Keystore — plain-text credentials never touch disk.
Inject this class wherever credentials need to be saved or read. The SDK itself never touches this class; it reads credentials on demand via io.rekast.sdk.network.interfaces.CredentialProvider.
Functions
Removes all persisted access token fields.
Returns the stored access token, or an empty string if it has expired or was never set.
Returns the stored auth_req_id, or an empty string if it has expired or was never set.
Returns the stored login hint, or an empty string if it was never set.
Returns the stored OAuth2 access token, or an empty string if it has expired or was never set.
Persists the Bearer access token along with its expiry time and token type.
Persists the API key obtained from the MTN MoMo sandbox/production portal.
Persists the auth_req_id from a backchannel authorization response along with its expiry.
Persists the login hint used in backchannel (CIBA) authorization requests.
Persists the OAuth2 access token, its expiry, token type, scope, and refresh token.