NuguOAuthInterface

interface NuguOAuthInterface

Authentication interface for the NUGU oauth

Types

Link copied to clipboard
interface OnAccountListener : NuguOAuthInterface.OnLoginListener

On account actions listener

Link copied to clipboard
interface OnDeviceAuthorizationListener

On deviceAuthorization actions listener

Link copied to clipboard
interface OnIntrospectResponseListener

On introspect actions listener

Link copied to clipboard
interface OnLoginListener

On login actions listener

Link copied to clipboard
interface OnMeResponseListener

On requestMe actions listener

Link copied to clipboard
interface OnRevokeListener

On Revoke actions listener

Link copied to clipboard
enum THEME : Enum<NuguOAuthInterface.THEME>

Functions

Link copied to clipboard
abstract fun accountWithTid(    activity: Activity,     listener: NuguOAuthInterface.OnAccountListener,     data: Map<String, String> = mapOf(),     theme: NuguOAuthInterface.THEME = THEME.LIGHT)

Start the account info with Tid.

Link copied to clipboard
abstract fun addAuthStateListener(listener: AuthStateListener)

addAuthStateListener adds an AuthStateListener on the given was changed

Link copied to clipboard
abstract fun getOptions(): NuguOAuthOptions?

Get the authorization options

Link copied to clipboard
abstract fun introspect(listener: NuguOAuthInterface.OnIntrospectResponseListener)

Request introspect The introspect specified by https://tools.ietf.org/html/rfc7662#section-2.1, OAuth 2.0 Token Introspection

Link copied to clipboard
abstract fun isAnonymouslyLogin(): Boolean

Checking the authorization status

Link copied to clipboard
abstract fun isLogin(): Boolean

Checking the authorization status

Link copied to clipboard
abstract fun isTidLogin(): Boolean

Checking the authorization status

Link copied to clipboard
abstract fun loginAnonymously(listener: NuguOAuthInterface.OnLoginListener)

Start anonymous login.

Link copied to clipboard
abstract fun loginSilentlyWithTid(refreshToken: String, listener: NuguOAuthInterface.OnLoginListener)

Refresh Token with tid.

Link copied to clipboard
abstract fun loginWithAuthenticationCode(code: String, listener: NuguOAuthInterface.OnLoginListener)

Start a login without browser. Only tid

Link copied to clipboard
abstract fun loginWithDeviceCode(deviceCode: String, listener: NuguOAuthInterface.OnLoginListener)

Login with device_code to issue tokens

Link copied to clipboard
abstract fun loginWithTid(    activity: Activity,     listener: NuguOAuthInterface.OnLoginListener,     data: Map<String, String> = mapOf(),     theme: NuguOAuthInterface.THEME = THEME.LIGHT)

Start the login with tid

Link copied to clipboard
abstract fun removeAuthStateListener(listener: AuthStateListener)
Link copied to clipboard
abstract fun requestMe(listener: NuguOAuthInterface.OnMeResponseListener)

Request me api

Link copied to clipboard
abstract fun revoke(listener: NuguOAuthInterface.OnRevokeListener)

Immediately revoke the authorization.

Link copied to clipboard
abstract fun setOptions(options: NuguOAuthOptions)

Set the authorization options

Link copied to clipboard
abstract fun startDeviceAuthorization(data: String, listener: NuguOAuthInterface.OnDeviceAuthorizationListener)

Start device authorization by requesting a pair of verification codes from the authorization service.

Inheritors

Link copied to clipboard