Package au.com.woolworths.village.sdk.auth

Types

ApiAuthenticator
Link copied to clipboard

Abstracts how the SDK authenticates with the API.

If an application has an existing authentication/authorisation workflow then an Adapter class can be used to integrate that workflow into the SDK to provide the necessary authentication

interface ApiAuthenticator<T : Any>
CredentialsStore
Link copied to clipboard

Abstracts how the SDK stores credentials obtained after authenticating with the API

interface CredentialsStore<T>
EmptyTokenApiAuthenticator
Link copied to clipboard
class EmptyTokenApiAuthenticator : ApiAuthenticator<HasAccessToken>
HasAccessToken
Link copied to clipboard

Indicates that a model has an access token that can be used to prove that SDK is authenticated

interface HasAccessToken
ProvidedTokenAuthenticator
Link copied to clipboard
class ProvidedTokenAuthenticator(token: String) : ApiAuthenticator<HasAccessToken>
StoringApiAuthenticator
Link copied to clipboard

An ApiAuthenticator that stores credentials after successfully authenticating.

class StoringApiAuthenticator<T : Any>(delegate: ApiAuthenticator<T>, store: CredentialsStore<T>) : ApiAuthenticator<T>