Ditto Authenticator
class DittoAuthenticator
Content copied to clipboard
Log in to a remote authentication service, using an OnlineWithAuthentication
or an Online
identity.
Types
Functions
is Authenticated
Link copied to clipboard
Query whether Ditto has a valid authentication token.
login With Credentials
Link copied to clipboard
fun loginWithCredentials(username: String, password: String, provider: String, completion: (DittoError?) -> Unit)
Content copied to clipboard
fun loginWithCredentials(username: String, password: String, provider: String, completionCallback: DittoLoginCompletionCallback)
Content copied to clipboard
Log in to Ditto with a username and password.
login With Token
Link copied to clipboard
fun loginWithToken(token: String, provider: String, completion: (DittoError?) -> Unit)
Content copied to clipboard
fun loginWithToken(token: String, provider: String, completionCallback: DittoLoginCompletionCallback)
Content copied to clipboard
Log in to Ditto with a third-party token.
observe Status
Link copied to clipboard
fun observeStatus(callback: (DittoAuthenticationStatus) -> Unit): Closeable
Content copied to clipboard
Registers a callback that is called whenever the authentication status changes.
fun observeStatus(callback: DittoAuthenticationStatusDidChangeCallback): Closeable
Content copied to clipboard
Registers an observer object that is called whenever the authentication status changes.