class: co.ravesocial.sdk.core.RaveAuthentication

Interface - RaveConnectStateListener#

Listener for plugin connect state:

public void onComplete(boolean isConnected, String userId, RaveException exception)

Parameters:

isConnected - True or false given whether plugin is connected with Rave

userId - User id of user for social provider (e.g. FB UID)

exception - Exception if any was encountered or null


Interface - RaveReadinessListener#

Listener for plugin state readiness:

public void onComplete(boolean isReady, RaveException exception)

Parameters:

isReady - True or false given whether plugin is ready (e.g. connected and userId equals expected UID associated with Rave account)

exception - Exception if any was encountered or null


Class - RaveAuthentication#

getConnectPlugins#

Get all registered RaveConnectPlugins:

Collection<? extends Object> getConnectPlugins()

Returns: A collection of plugin objects


getConnectPlugin#

Get an implementation of a RaveConnectPlugin:

Object getConnectPlugin(String pluginKeyName)

Parameters:

pluginKeyName - The KeyName of the plugin

Returns: The plugin object


registerConnectPlugin (built-in)#

Registers an internally implemented RaveConnectPlugin:

void registerConnectPlugin(String pluginKeyName)

Parameters:

pluginKeyName - The KeyName of the plugin


registerConnectPlugin (external)#

Registers an implementation of a RaveConnectPlugin:

void registerConnectPlugin(RaveConnectPlugin plugin)

Parameters:

plugin - The plugin to register


loginAsGuest#

Logs in as guest

Will throw an exception if RaveSettings.General.AutoGuestLogin is enabled:

void loginAsGuest(String raveId, RaveCompletionListener listener)

Parameters:

raveId - The RaveID to use for the new Guest listener - Completion listener (see RaveCompletionListener)


loginWith#

Attention

Rather than implementing a fully custom control for connecting your users we suggest as best practice that you instead use your custom UI to wrap one of our connect controllers. Please read Adding a Facebook (or other social provider) button to your App.

Logs in using an authentication provider

void loginWith(String pluginKeyName, RaveCompletionListener listener)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin listener - Completion listener (see RaveCompletionListener)


connectTo#

Attention

Rather than implementing a fully custom control for connecting your users we suggest as best practice that you instead use your custom UI to wrap one of our connect controllers. Please read Adding a Facebook (or other social provider) button to your App.

Connects an existing Rave account using an authentication provider

void connectTo(String pluginKeyName, RaveCompletionListener listener)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin listener - Completion Listener (see RaveCompletionListener)


connectTo#

Note

You’re encouraged to call connectTo instead.

Connects an existing Rave account using an authentication provider

void connectTo(String pluginKeyName, RaveConflictResolutionPolicy policy, RaveCompletionListener listener)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin policy - The conflict resolution policy to use for this call listener - Completion Listener (see RaveCompletionListener)


forceConnectTo#

Connects an existing Rave account using an authentication provider:

void forceConnectTo(String pluginKeyName, RaveCompletionListener listener)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin listener - Completion Listener (see RaveCompletionListener)


disconnectFrom#

Disconnect an existing account from an authentication provider:

void disconnectFrom(String pluginKeyName, RaveCompletionListener listener)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin listener - Completion Listener (see RaveCompletionListener)


lastKnownReadinessOf#

Gets the last known readiness state of an authentication provider

boolean lastKnownReadinessOf(String pluginKeyName)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin

Returns: true if ready, false if not


checkReadinessOf#

Checks the current readiness state of an authentication provider

void checkReadinessOf(String pluginKeyName, RaveReadinessListener listener)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin listener - Completion Listener


getCurrentTokenFrom#

Gets the current token of a specific type from an authentication provider

String getCurrentTokenFrom(String pluginKeyName, RaveConnectPlugin.RaveTokenType tokenType)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin tokenType - The type of token to get

Returns: The token or null if no token


getCurrentTokenFrom#

Gets the current access token from an authentication provider

String getCurrentTokenFrom(String pluginKeyName)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin

Returns: The access token or null if no token


useTokenForRaveUpgradeWith#

Specifies a token to use when upgrading from a previous installation without Rave:

void useTokenForRaveUpgradeWith(String pluginKeyName, String token)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin token - The token to use


logOut#

Logs the current user out of Rave

Providing a null listener will result in operations such as automatic guest login and session deletion happening asynchronously. To guarantee that a race does not happen with any other authentication actions, it is highly recommended that a listener be set and that no other Rave APIs be called until the listener has called back.

void logOut(RaveCompletionListener listener)

Parameters:

listener - Completion listener (see RaveCompletionListener)


fetchConnectStateOf#

Fetches the current connect state of an authentication provider

void fetchConnectStateOf(String pluginKeyName, RaveConnectStateListener listener)

Parameters:

pluginKeyName - The KeyName of the authentication provider plugin listener - The connect state listener


fetchThirdPartyInfo#

Fetches third party information for a network:

void fetchThirdPartyInfo(String thirdPartyKey, RaveConnectStateListener listener)

Parameters:

thirdPartyKey - The third-party key listener - The connect state listener