Widget FAQ

From Veridu

You can embed widgets on your site to enable Veridu functionality, they are available as two types:

  • Single Sign On+: Provide users easy sign-on
  • Verify: Challenge users to confirm their identity prior to conducting a risky transaction

How can I setup a widget?

Setting up a widget can be done from directly within the dashboard. From your account navigate to the ‘API Keys’ section and click on ‘Create widget’ from here. The interface will guide you through the setup process including the type of widget and the selection of the sources.

The config page will generate HTML code you can insert into your website to initiate the widget you created.

How can I use the Veridu information on my site?

Once you have your widget setup you can use Event Listeners to receive and process information within your site. Event listeners are:

Info Payload Example
Name:

Veridu.EmbeddedWidget

Applicable to:
Embedded Widget

Trigger:
Every request to the API, Verification succeeded, Verification failed

  1. {
 
  2.   payload: { 
  3.     type: 'poll' | 'verification-success' | 'verification-failed',
  4.     data: CURRENT_USER_DATA
  5.   }
  6. }
  1. window.addEventListener('Veridu.EmbeddedWidget', function (evt) {
  2.   var type = evt.payload.type;
  3.   var user = evt.payload.data;
  4.   var widgetCfg = VeriduEmbeddedWidget.cfg.olc;
  5.  
  6.   // Capture session variables (to query the API)
  7.   var cfg = {
  8.     session: widgetCfg.session,
  9.     username: widgetCfg.username,
  10.     client: widgetCfg.key
  11.   };
  12.  
  13.   // Handle event by event type
  14.   switch(type) {
  15.     case 'verification-success': 
  16.       console.log('User verified! ', user);
  17.     break;
  18.     case 'verification-failed': 
  19.       console.log('User verification failed! ', user);
  20.     break;
  21.   }
  22. });
Name:

Veridu_SSO_Authenticated

Applicable to:
SSO+ Widget

Trigger:
User authentication

  1. {
  2.   detail: { 
  3.     veridu_user: 
  4.       CURRENT_USER_DATA
 
  5.   }
  6. }
  1. window.addEventListener('Veridu_SSO_Authenticated', function (evt) {
  2.   // Print the user name to the javascript console
  3.   console.log(evt.detail.veridu_user.name.value);
  4.  
  5.   // Capture session variables (to query the API)
  6.   var veridu_session = window.VeriduSSOWidget.sdkCfg.session;
  7.   var veridu_user = window.VeriduSSOWidget.sdkCfg.user;
  8.   var veridu_client  = window.VeriduSSOWidget.sdkCfg.client; // API KEY
  9. });
Name:

Veridu.Verified

Applicable to:
Verify Widget

Trigger:
User verification

  1. {
 
  2.   Veridu: 
  3.     CURRENT_USER_DATA

  4. }
  1.  
  2. window.addEventListener('Veridu.Verified', function (evt) {
  3.   // Print the user name to the javascript console
  4.   console.log(evt.Veridu.raw.user.name.value);
  5.  
  6.   // Capture session variables (to query the API)
  7.   var veriduCfg = window.VeriduOLC.sdkCfg;
  8. });