Methods
(async) acknowledgeSSO()
Acknowledge SSO login after redirect to obtain access token.
(async) clientIsAuthenticated(instanceNameopt) → {boolean}
Check if client authenticated
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
instanceName |
string |
<optional> |
default | instance to log out; if not provided, the default instance is checked |
Returns:
flag indicating if client is currently authenticated to SlashDB instance
- Type
- boolean
(async) login(username, password, sdbClient, fnc)
Log into a SlashDB instance with a username and password. Executes provided function on successful login
Parameters:
Name | Type | Description |
---|---|---|
username |
string | user to log into SlashDB instance with |
password |
string | password for user |
sdbClient |
SlashDBClient | a SlashDBClient object containing SlashDB host config, obtained from calling the useSetUp hook |
fnc |
function | function to be executed after successful login |
(async) loginSSO(popUp, sdbClient, fnc)
Logs in to SlashDB instance. Only required when using SSO.
Parameters:
Name | Type | Description |
---|---|---|
popUp |
boolean | optional flag to sign in against the identity provider with a Pop Up window (false by default) |
sdbClient |
SlashDBClient | a SlashDBClient object containing SlashDB host config, obtained from calling the useSetUp hook |
fnc |
function | function to be executed after successful login |
(async) logout(fnc, instanceNameopt)
Log out of SlashDB instance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fnc |
function | to be executed after logout. Eg. push route away from restricted area of application. |
|
instanceName |
string |
<optional> |
instance to log out; if not provided, all registered instances are logged out |
(async) refreshSSO()
Refreshes the SSO access token.
(async) updateSSO(sso)
Logs in to SlashDB instance. Only required when using SSO.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sso |
Object | optional settings to login with Single Sign-On Properties
|