Download the PHP package ums-lspl/photosign-verification-client without Composer
On this page you can find all versions of the php package ums-lspl/photosign-verification-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ums-lspl/photosign-verification-client
More information about ums-lspl/photosign-verification-client
Files in ums-lspl/photosign-verification-client
Package photosign-verification-client
Short Description Laravel client for PhotoSign Verification — validate passport photos and handwritten signatures before storing them.
License MIT
Homepage https://github.com/rajkumarchanda/ums-photosign-verification-client
Informations about the package photosign-verification-client
ums-lspl/photosign-verification-client
Laravel package for consumer applications (SmartExam / UMS) that validate passport photos and handwritten signatures via PhotoSign Verification.
Images are checked in memory on PhotoSign and never stored. Do not put OpenCV in Laravel.
Requirements
- PHP 8.2+
- Laravel 10, 11, or 12
Installation
From this monorepo (path)
In your consumer app's composer.json:
From Packagist / VCS (when published)
Configuration
.env on your consumer app:
Create an API key in PhotoSign → API keys (assign to the university client). Start with PHOTOSIGN_FAIL_MODE=shadow so enrolment is not blocked while you tune thresholds.
PHOTOSIGN_LOCALE (en or hi) sets student-facing issue copy. Per-call locale overrides it.
fail_mode:
| Mode | Behaviour |
|---|---|
closed |
Validation failures and outages block the upload |
shadow |
Call PhotoSign, log would-be rejects, never block the user |
open |
Never block; still call PhotoSign when possible |
PHOTOSIGN_SHADOW=true is an alias for shadow mode.
Usage
Hard rejects throw. Soft warnings / warning_issues do not throw — use $result->hasWarnings() or $result->tipMessages() when you want coaching tips after accept.
Livewire temporary uploads on S3/GCS are supported: the client prefers readStream() / get() when the SplFileInfo path is not a real local file. You can pass $this->photo directly — no app-side materialize helper is required.
Capture widget dataUrl values are also accepted by validatePhoto(). Decode for storage with:
Batch and signature enrolment:
Webhooks
HMAC header: X-PhotoSign-Signature: t=<unix>,v1=<hex> over {timestamp}.{rawBody}. Also sent as X-PhotoSign-Timestamp. Reject signatures older than ~5 minutes (replay protection). Secrets are shown once in PhotoSign Settings and encrypted at rest:
Live capture widget
Do not put API keys in the browser. Your server creates a short-lived session:
SmartExam integration point
Call PhotoSign in PhotoSignature::updatedPhoto() / updatedSignature() (and profile media flows) before uploading to S3:
- Validate mime/size locally (existing rules).
PhotoSign::validatePhoto(...)/validateSignature(...).- If
ValidationFailedException, show$e->getMessage()and do not upload. - Prefer shadow mode for the first rollout.
Testing
License
MIT
All versions of photosign-verification-client with dependencies
guzzlehttp/guzzle Version ^7.8
illuminate/support Version ^10.0|^11.0|^12.0
psr/log Version ^1.1|^2.0|^3.0