Other Functions
Table of contents
.setToken()
Sets the token, overwriting whatever token was already saved in the library. This function also resets the token confirmation status.
Pass a string into the function with the new token value.
JVerify.setToken('new-jverify-token');
.getToken()
Returns the current token as a string.
console.log(JVerify.getToken())
.setVendor()
Sets the vendor, overwriting whatever was already saved in the library.
Pass a string into the function with the new vendor value.
JVerify.setVendor('new vendor');
.getVendor()
Returns the current vendor as a string.
console.log(JVerify.getVendor());
.getTokenConfirmed()
Returns if JVerify’s servers have confirmed the current token is valid. This is overwritten whenever there is an authentication issue or the token is changed.
if(JVerify.getTokenConfirmed()) {
// Token is still valid
}