WebService::Async::Onfido - unofficial support for the Onfido identity verification service
Executes a hook, if specified at configure time.
Takes the following:
$hook
- the hook to execute$data
- data to pass to the sub
It returns undef
Retrieves a list of all known applicants.
Returns a Ryu::Source which will emit one WebService::Async::Onfido::Applicant for each applicant found.
Supports paging through HTTP GET requests.
$starting_uri
- the initial URI to request$factory
- asub
that we will call with a Ryu::Source and expect to return a second response-processingsub
.
Returns a Ryu::Source.
Given a set of strings representing the Link
headers in an HTTP response,
extracts the URIs based on the rel
attribute as described in
RFC5988.
Returns a list of key, value pairs where the key contains the lowercase rel
value
and the value is a URI instance.
my %links = $self->extract_links($res->header('Link'))
print "Last page would be $links{last}"
Creates a new applicant record.
See accessors in WebService::Async::Onfido::Applicant for a full list of supported attributes. These can be passed as named parameters to this method.
Returns a Future which resolves to a WebService::Async::Onfido::Applicant instance on successful completion.
Updates a single applicant.
Returns a Future which resolves to empty on success.
Deletes a single applicant.
Returns a Future which resolves to empty on success.
Retrieve a single applicant.
Returns a Future which resolves to a WebService::Async::Onfido::Applicant
List all documents for a given WebService::Async::Onfido::Applicant.
Takes the following named parameters:
applicant_id
- the "id" in WebService::Async::Onfido::Applicant for the applicant to query
Returns a Ryu::Source which will emit one WebService::Async::Onfido::Document for each document found.
Gets a document object for a given WebService::Async::Onfido::Applicant.
Takes the following named parameters:
applicant_id
- the "id" in WebService::Async::Onfido::Applicant for the applicant to querydocument_id
- the "id" in WebService::Async::Onfido::Document for the document to query
Returns a Future object which consists of a WebService::Async::Onfido::Document
List all photos for a given WebService::Async::Onfido::Applicant.
Takes the following named parameters:
applicant_id
- the "id" in WebService::Async::Onfido::Applicant for the applicant to query
Returns a Ryu::Source which will emit one WebService::Async::Onfido::Photo for each photo found.
Gets a live_photo object for a given WebService::Async::Onfido::Applicant.
Takes the following named parameters:
live_photo_id
- the "id" in WebService::Async::Onfido::Photo for the document to query
Returns a Future object which consists of a WebService::Async::Onfido::Photo
Uploads a single document for a given applicant.
Takes the following named parameters:
type
- can bepassport
,photo
,poa
side
- which side, eitherfront
orback
issuing_country
- which country this document is forfilename
- the file name to use for this itemdata
- the bytes for this image file (must be in JPEG format)
Uploads a single "live photo" for a given applicant.
Takes the following named parameters:
applicant_id
- ID for the person this photo relates toadvanced_validation
- perform additional validation (ensure we only have a single face)filename
- the file name to use for this itemdata
- the bytes for this image file (must be in JPEG format)
Perform an identity check on an applicant.
This is the main method for dealing with verification - once you have created the applicant and uploaded some documents, call this to start the process of checking the documents and details, and generating the reports.
https://documentation.onfido.com/#check-object
Takes the following named parameters:
applicant_id
- the applicant requesting the checkdocument_ids
- arrayref of documents ids to be analyzed on this checkreport_names
- arrayref of the reports to be made (e.g: document, facial_similarity_photo)tags
- custom tags to apply to these reportssuppress_form_emails
- if true, do not send out the email to the applicantasynchronous
- return immediately and perform check in the background (default true since v3)charge_applicant_for_check
- the applicant must enter payment details for this check, and it will not count towards the quota for this service accountconsider
- used for sandbox API testing only
Returns a Future which will resolve with the result.
Gets the PDF report for a given WebService::Async::Onfido::Check.
Takes the following named parameters:
check_id
- the "id" in WebService::Async::Onfido::Check for the check to query
Returns a PDF file blob
Gets a live_photo in a form of binary data for a given WebService::Async::Onfido::Photo.
Takes the following named parameters:
live_photo_id
- the "id" in WebService::Async::Onfido::Photo for the document to query
Returns a photo file blob
Gets a document in a form of binary data for a given WebService::Async::Onfido::Document.
Takes the following named parameters:
applicant_id
- the "id" in WebService::Async::Onfido::Applicant for the applicant to querydocument_id
- the "id" in WebService::Async::Onfido::Document for the document to query
Returns a document file blob
Returns a hashref containing 3-letter country codes as keys and supporting status as their value.
Returns an array of hashes of supported_documents for each country
Returns the supported_documents_list for the country
Returns 1 if country supported and 0 for unsupported
Returns the generated Onfido Web SDK token for the applicant.
https://documentation.onfido.com/#web-sdk-tokens
Takes the following named parameters:
applicant_id
- ID of the applicant to request the token forreferrer
- the URL of the web page where the Web SDK will be used
Returns an accessor for the endpoints data. This is a hashref containing URI templates, used by "endpoint".
Expands the selected URI via URI::Template. Each item is defined in our endpoints.json
file.
Returns a URI instance.
Returns true if we are currently rate limited, false otherwise.
May eventually be updated to return number of seconds that you need to wait.
Applies rate limiting check.
Returns a Future which will resolve once it's safe to send further requests.
deriv.com
Copyright Deriv.com 2019.
Licensed under the same terms as Perl5 itself.