Global

Methods

activateEmailCode(params)

Submit an auth code inboxed by sendCodeToEmail. This will serve to authenticate you to the Virtru platform. Can only be called in a browser.

Callers must ensure the user has been successfully logged in using isLoggedIn.
Parameters:
Name Type Description
params object [All parameters for this operation.]
Properties
Name Type Description
email string [The email address used to authenticate.]
code string [The authorization code fetched from the Virtru email prompted by #sendCodeToEmail.]
redirectUrl string [The optional url to redirect to following authentication.]

fetchKasPubKey()

If we have KAS url but not public key we can fetch it from KAS, fetching the value from `${kas}/kas_public_key`.

isLoggedIn(params) → {boolean}

Check if a user has already been logged in, and that their credentials have not expired. Can only be called in a browser.
Parameters:
Name Type Description
params object [All parameters for this operation, including ones delegated to the oauth initializer.]
Properties
Name Type Description
email string [The email address to check if logged in.]
Returns:
- True if the email address is logged in with valid, active credentials.
Type
boolean

loginWithGoogle(params)

Authenticate to Virtru by federating a Google account. Can only be called in a browser.
Parameters:
Name Type Description
params object [All parameters for this operation.]
Properties
Name Type Description
email string [The email address used to authenticate.]
redirectUrl string [The optional url to redirect to following authentication.]

loginWithOffice365(params)

Authenticate to Virtru by federating an Office 365 account. Can only be called in a browser.
Parameters:
Name Type Description
params object [All parameters for this operation.]
Properties
Name Type Description
email string [The email address used to authenticate.]
redirectUrl string [The optional url to redirect to following authentication.]

loginWithOutlook(params)

Authenticate to Virtru by federating an Outlook account. Can only be called in a browser.
Parameters:
Name Type Description
params object [All parameters for this operation.]
Properties
Name Type Description
email string [The email address used to authenticate.]
redirectUrl string [The optional url to redirect to following authentication.]

logout(params)

Log a user out, invalidating any stored credentials. Can only be called in a browser.
Parameters:
Name Type Description
params object [All parameters for this operation.]
Properties
Name Type Description
email string [The email address used to authenticate.]

sendCodeToEmail(params)

Request an an auth code be sent to the specified email address. Can only be called in a browser.
Parameters:
Name Type Description
params object
Properties
Name Type Description
email string [The email address to which an auth code should be sent.]