public interface

OmletAuthApi

mobisocial.omlib.api.OmletAuthApi

Class Overview

APIs for authenticating the local user account. Access as auth().

Summary

Public Methods
abstract void addOnAccountConnectedListener(OnAccountConnectedListener c)
Register a listener that is triggered when an account has been connected to the client.
abstract void authenticateWithServiceToken(String serviceType, String authToken, OnAuthenticationCompleteListener listener)
Submits a 3rd party authentication token to attach the associated Omlet account to this client.
abstract String getAccount()
Gets the connected Omlet account or null if not authenticated.
abstract List<RawIdentity> getLinkedIdentities()
Returns the list of identities (email addresses, phone numbers, etc) that have been linked to the currently logged-in account.
abstract boolean isAuthenticated()
True if the user has an account connected.
abstract void logout()
Logs the user out and deletes user data.
abstract void removeOnAccountConnectedListener(OnAccountConnectedListener c)
abstract void unlinkIdentity(RawIdentity identity)
Unlinks an identity from the currently logged-in account.

Public Methods

public abstract void addOnAccountConnectedListener (OnAccountConnectedListener c)

Register a listener that is triggered when an account has been connected to the client. If an account is already connected as indicated by isAuthenticated(), the callback fires immediately.

public abstract void authenticateWithServiceToken (String serviceType, String authToken, OnAuthenticationCompleteListener listener)

Submits a 3rd party authentication token to attach the associated Omlet account to this client.

public abstract String getAccount ()

Gets the connected Omlet account or null if not authenticated.

public abstract List<RawIdentity> getLinkedIdentities ()

Returns the list of identities (email addresses, phone numbers, etc) that have been linked to the currently logged-in account.

public abstract boolean isAuthenticated ()

True if the user has an account connected.

public abstract void logout ()

Logs the user out and deletes user data. This method issues a server call and does filesystem operations, it must not be called from the main thread.

public abstract void removeOnAccountConnectedListener (OnAccountConnectedListener c)

public abstract void unlinkIdentity (RawIdentity identity)

Unlinks an identity from the currently logged-in account.