Widget Library

From Veridu

This library is available as veridu-widget.js and veridu-widget.min.js.

Veridu

Library Constructor


Usage

function (options)


Parameters

parameter values default value description
options.client a valid client identification none Client identification supplied by Veridu.
options.session any valid session token none Session token (obtained from session resource).
options.language Language List en-us Language used in widgets.
options.country Country List us Country used in widgets (e.g. SMS one-time-password).
options.version a valid version none Veridu's API/Widget version to be used (check version)

Widget.badge_wrapper

Wraps all <img> tags with a data-veridu-user property into a profile badge.


Usage

function (options)


Parameters

parameter values default value description
options.height any integer value 16 Display size for badges.
options.method Popup Trigger Method hover Trigger method to display popup window.
options.popup Popup Display Size small Popup display size. (large displays more information than small)
options.type Badge Display Type image Badge type to be displayed.
options.request boolean true Controls Improve your credibility/Request better verification from user link display on popups


HTML Markup

parameter values default value description
data-veridu-user any valid user identification none Badge's user identification.
data-veridu-popup Boolean true When true, popup will be displayed triggered by method option.
data-veridu-type Popup Display Size Same value as options.popup Override popup display size.

Widget.request_wrapper

Wraps a tag into a clickable container to display request listing


Usage

function (container, user)


Parameters

parameter values default value description
container
  • DOM Object
  • CSS Selector
  • jQuery Object
none Element to be wrapped.
user any valid user identification none User identification for whom the request listing will be displayed.

Widget.personal

Displays a Personal Information submission form


Usage

function (user)


Parameters

parameter values default value description
user any valid user identification none User identification for whom the request listing will be displayed.

Widget.challenge

Displays an identity challenge widget


Usage

function (container, user, options)


Parameters

parameter values default value description
container
  • DOM Object
  • CSS Selector
  • jQuery Object
none Parent element to request iframe.
user any valid user identification none User identification for displaying the form.
options.setup User Attributes User Attributes All optional verification methods a user can do..

Widget.overall

Displays a personal score information on the specified container


Usage

function (container, user)


Parameters

parameter values default value description
container
  • DOM Object
  • CSS Selector
  • jQuery Object
none Parent element to request iframe.
user any valid user identification none User identification for displaying the form.

Widget.score

Displays a personal score information on the specified container


Usage

function (container, user, options)


Parameters

parameter values default value description
container
  • DOM Object
  • CSS Selector
  • jQuery Object
none Parent element to request iframe.
user any valid user identification none User identification for displaying the form.
options.setup User Attributes
  • name
  • gender
  • birth
  • location
  • email
  • phone
Array of Options
options.size Score bar Size small Size.

Widget.request_widget

Displays a request iframe


Usage

function (container, from, to, type)


Parameters

parameter values default value description
container
  • DOM Object
  • CSS Selector
  • jQuery Object
none Parent element to request iframe.
from any valid user identification none User identification for the user who is sending the request.
to any valid user identification none User identification for the user which is being sent the request.
type Request Type none Request type to be sent.

Widget.kba_widget

Displays a popup window, providing a knowledge-based-authentication screen


Prerequisites

  • This widget must be used with a write-enabled session.
  • The user parameter must be the same user attached to the current session.


Usage

function (user, type)


Parameters

parameter values default value description
user any valid user identification none User identification for the user to be verified.
type KBA Providers none Knowledge-based-authentication method name.

Widget.document_widget

Displays a popup window, providing a document upload screen


Prerequisites

  • This widget must be used with a write-enabled session.
  • The user parameter must be the same user attached to the current session.


Usage

function (user)


Parameters

parameter values default value description
user any valid user identification none User identification for the user to be verified.

Widget.otp_widget

Displays a popup window, providing a one-time-password screen


Prerequisites

  • This widget must be used with a write-enabled session.
  • The user parameter must be the same user attached to the current session.


Usage

function (user, type)


Parameters

parameter values default value description
user any valid user identification none User identification for the user to be verified.
type OTP Providers none Knowledge-based-authentication method name.

Widget.cpr_widget

Displays a popup window, providing a CPR screen

ALERT CPR Support has been deprecated and will soon be removed.

Prerequisites

  • This widget must be used with a write-enabled session.
  • The user parameter must be the same user attached to the current session.

Usage

function (user)

Parameters

parameter values default value description
user any valid user identification none User identification for the user to be verified.

Widget.nemid_widget

Displays a popup window, providing a NemID Applet screen

ALERT NemID Support has been deprecated and will soon be removed.

Prerequisites

  • This widget must be used with a write-enabled session.
  • The user parameter must be the same user attached to the current session.


Usage

function (user[, redirect])


Parameters

parameter values default value description
user any valid user identification none User identification for the user to be verified.
redirect valid url none URL to be redirected after verification.

Widget.provider_login

Displays a popup window, providing OAuth login to given service


Prerequisites

  • This widget must be used with a write-enabled session.
  • The user parameter must be the same user attached to the current session.


Usage

function (user, service[, redirect])


Parameters

parameter values default value description
user any valid user identification none User identification for the user to be verified.
service
  • Social Media & Online Services Providers
  • KBA Providers
  • OTP Providers
  • Other Providers
none Social Media/Online Service OAuth provider name.
redirect valid url none URL to be redirected after verification.

Widget.profile

Displays a user profile iframe with verified information scores and badges


Usage

function (container, user)


Parameters

parameter values default value description
container
  • DOM Object
  • CSS Selector
  • jQuery Object
none Parent element to request iframe.
user any valid user identification none User identification for displaying the form.

Widget.verification

Displays a user's own verification iframe


Prerequisites

  • This widget must be used with a write-enabled session.
  • The user parameter must be the same user attached to the current session.


Usage

function (container, user, setup)


Parameters

parameter values default value description
container
  • DOM Object
  • CSS Selector
  • jQuery Object
none Parent element to request iframe.
user any valid user identification none User identification for the user to be verified.
setup.aot one or an array of any valid verification methods none All mandatory verification methods that the user must do.
setup.oot

array of any valid verification methods
array of arrays of any valid verification methods

none

User must do only one verification method.
User must do only one verification method from each array.

setup.opt one or an array of any valid verification methods none All optional verification methods that the user can do.

Badge.name

Returns the displayable name of a given badge


Prerequisites

  • This widget must be used with a write-enabled session.
  • The user parameter must be the same user attached to the current session.


Usage

function (name)


Parameters

parameter values default value description
name
  • Social Media & Online Services Providers
  • KBA Providers
  • OTP Providers
  • Other Providers
none Badge name.

See Also