AccountsClient
Index
Constructors
constructor
Parameters
options: AccountsClientOptions
transport: TransportInterface
Returns AccountsClient
Properties
publictransport
Methods
publicauthenticateWithService
Parameters
service: string
credentials: {}
Returns Promise<boolean>
publicclearTokens
Remove the tokens from the storage
Parameters
optionaloriginal: boolean
Returns Promise<void>
publicgetTokens
Get the tokens from the storage
Parameters
optionaloriginal: boolean
Returns Promise<any>
publicgetUser
Get the user infos
Returns Promise<User>
publicimpersonate
Impersonate to another user.
Parameters
impersonated: { email?: string; userId?: string; username?: string }
Returns Promise<ImpersonationResult>
publicloginWithService
Login the user with a specific service
Parameters
service: string
credentials: {}
Returns Promise<LoginResult>
publiclogout
Logout the user Call the server to invalidate the tokens Clean user local storage
Returns Promise<void>
publicrefreshSession
Refresh the user session If the tokens have expired try to refresh them
Parameters
force: boolean = false
Returns Promise<any>
publicsetTokens
Store the tokens in the storage
Parameters
tokens: Tokens
optionaloriginal: boolean
Returns Promise<void>
publicstopImpersonation
Stop the user impersonation.
Returns Promise<void>
Authenticate the user with a specific service (not creating a session)