Build with OSPP › Build on it

Verify widget

Two lines of HTML put a live passport check on any web page: the verdict, the current status and a link to the passport.

See it#

This is the widget checking a real passport, live:

Add it to your page#

<script src="https://www.ospp.it.com/build/widget/ospp-verify.js" defer></script>
<ospp-verify passport="cert_..."></ospp-verify>

Put the script once on the page, then one element per passport. It works in any page, framework or content management system that allows HTML: the element is a standard web component with its own styles, so your page's styles do not change it and it does not change your page.

Options#

AttributeWhat it does
passportThe passport id, cert_.... Required.
compactOne line instead of a card, for tables and lists.
theme="dark"Colours for dark backgrounds.
apiAnother OSPP API address. Defaults to https://www.ospp.it.com/api.

The element fires ospp-verified with the full answer in event.detail when the check completes, and ospp-error with a message when it cannot, so your page can react to the verdict.

What it shows#

  • Record checks passed, in green: every rule that can be decided from the file passed, and OSPP's status lookup says the passport is issued.
  • Some checks remain undetermined, in amber: nothing failed, but at least one rule could not be decided, for example a witness policy older than the rule that checks it. The passport page explains which.
  • Record checks failed, or a suspended or revoked passport, in red.

Under the verdict it shows the passport's status and how many rules passed, and it links to the passport page, where anyone can check the file in their own browser.

Privacy#

The widget makes one request: the passport id, sent to OSPP's public verification endpoint. It sends no cookies, no referrer and nothing about your visitors, and it loads nothing else. The answer is the same public information the passport page shows.