Download the PHP package registrucentras/onesign without Composer
On this page you can find all versions of the php package registrucentras/onesign. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download registrucentras/onesign
More information about registrucentras/onesign
Files in registrucentras/onesign
Package onesign
Short Description GoSign OneSign API client for PHP
License MIT
Informations about the package onesign
OneSign PHP API Client
Reikalavimai
- PHP 7.4+ arba 8.0+
Patariam
- Nginx
- php-fpm
Funkcijos
- PDF dokumentų pasirašymas;
- laiko žymų uždėjimas ant PDF dokumentų.
Diegimas
Norėdami greitai integruoti šią biblioteką į savo PHP projektą naudokite Composer PHP paketų valdymo įrankį. Jei jūsų projektas nenaudoja PSR standartu paremtą HTTP klientą, papildomai įdiekite vieną iš jų. Daugiau informacijos galite rasti paslaugų teikimo tvarkoje.
Standartinis diegimas
Naudojimas
Inicijuokite API kliento objektą.
Autentifikavimas, užklausų ir atsakymų validacija
Pasirašymo paslaugos saugumas ir kliento autentifikavimas užtikrinamas naudojant asimetrinę kriptografiją:
- jūsų privatus raktas, naudojamas siunčiamam turiniui pasirašyti;
- jūsų viešas raktas (perduodamas GoSign administratoriui), naudotojui ir jo siunčiamam turiniui patvirtinti;
- viešas GoSign raktas (pateikiamas individualiai GoSign administratoriaus), užklausos atsakymo vientisumui užtikrinti.
kaip generuoti raktus pateikiama raktų generavimo instrukcijoje.
Pavyzdžiai
Dokumento pasirašymas
Dokumento pasirašymas vyksta keliais etapais:
- inicijuojama pasirašymo transkacija (
$client->init()
); - asmuo, pasirašantis dokumentą, nukreipiamas į pasirašymo puslapį;
- pasirašomas dokumentas;
- asmuo, pasirašantis dokumentą, nukreipiamas į (
$client->init()
) metode nurodytą pasirašymo sėkmės puslapį; - gaunamas pasirašytas dokumentas (
$client->result()
).
Inicijuota pasirašymą galite nutraukti ($client->cancel()
) (iki dokumento pasirašymo).
Pasirašymo inicijavimas
Dokumento pasirašymo inicijavimui yra naudojami keturi esybių objektai:
Signer
- aprašomas pasirašantis asmuo;File
- aprašomas pasirašomas failas;SignatureConfiguration
- aprašoma parašo konfigūracija;Configuration
- aprašoma pasirašymo konfigūracija.
rezultate gauname:
transactionId
- pasirašymo transakcijos unikalus numeris;signingUrl
- pasirašymo puslapio adresas, į kurį bus nukreipiamas pasirašytojas.
Daugiau veikiančių pavyzdžių galite rasti kliento testavimo scenarijuose.
Pasirašymo transakcijos būsenos patikrinimas ir pasirašyto failo gavimas
Pasirašyto dokumento gavimui yra naudojamas vienas esybių objektas:
Transaction
- pasirašymo transakcijos unikalus numeris gautas iš pasirašymo inicijavimo etapo.
rezultate gauname:
status
- pasirašymo transakcijos būsena (SigningResponseStatus::IN_PROGRESS
- pasirašymas inicijuotas, laukiama dokumento pasirašymo,SigningResponseStatus::SIGNED
- dokumentas pasirašytas,SigningResponseStatus::CANCELED
- dokumento pasirašymas buvo nutrauktas);
prie SigningResponseStatus::IN_PROGRESS
pateikiamas papildomas parametras:
signerCertificate
- asmens, kuris pasirašo dokumentą, sertifikatas;
prie SigningResponseStatus::SIGNED
pateikiami papildomi parametrai:
file
- failo esybės objektas;
gaukite pasirašyto failo pavadinimą:
gaukite pasirašyto failo turinį:
-
signerCertificate
- asmens, kuris pasirašė dokumentą, sertifikatas; signerCertificateTrusted
- asmens, kuris pasirašė dokumentą, sertifikato validumas (boolean:true
- validus,false
- ne validus).
Pasirašymo nutraukimas
Pasirašymo nutraukimui yra naudojamas vienas esybių objektas:
Transaction
- pasirašymo transakcijos unikalus numeris gautas iš pasirašymo inicijavimo etapo.
rezultate gauname:
status
- pasirašymo transakcijos būsena (CancelSigningResponseStatus::CANCELED
- pasirašymas buvo nutrauktas,CancelSigningResponseStatus::ERROR
- pasirašymo nutraukti nepavyko);
Atitiktis
- Standard PHP package skeleton;
- HTTP message interfaces (PSR-7);
- HTTP Server Request Handlers, Middleware (PSR-15);
- HTTP factories (PSR-17);
- Code styles (PSR-12);
- PHPDoc standartas (PSR-5, PSR-19);
- Unit and integration testai;
- Ištestuota su Github Actions;
- PHPStan (Level: max);
- Docker konteineris su Xdebug palaikymu.
Plėtra
Esame atviri atviro kodo politikai. Norite prisidėti prie projekto? Visada laukiame pakeitimų. Kaip tai padaryti? Atlikite pakeitimus atskiroje kodo atšakoje ir siųkite „Pull“ užklausas į pagrindinę kodo atšaką. Prašome tik:
- vadovautis Symfony karkaso standartais;
- įsitikinti, kad po pakeitimo esami testai veikia tinkamai;
- įsitikinti, kad pakeitimas yra "padengtas" testu;
- vykdyti nuoseklią kodo versijų kontrolę: kiekvieno pakeitimo aprašymas yra prasmingas;
- naudoti rebase kad išvengumėte konfilktų;
- nepamiršti ir dokumentacijos;
- statiniam kodui skenuoti naudoti psalm ir PHP_CodeSniffer;
- kodo kokybei užtikrinti naudoti phpstan;
- automatiniam refaktorinimui naudoti rector.
Nuo ko pradėti?
Įsitikinkite, kad jūsų darbo vieta palaiko Docker
ir komandų vykdymo Make
PĮ.
Paleiskite automatinius testus ir kodo analizės įrankius:
All versions of onesign with dependencies
ext-json Version *
php-http/cache-plugin Version ^1.7.1
php-http/client-common Version ^2.3
php-http/discovery Version ^1.12
php-http/httplug Version ^2.2
php-http/multipart-stream-builder Version ^1.1.2
psr/cache Version ^1.0
psr/http-client-implementation Version ^1.0
psr/http-factory-implementation Version ^1.0
psr/http-message Version ^1.0
fig/http-message-util Version ^1.1
symfony/polyfill-php80 Version ^1.17
meng-tian/php-soap-interpreter Version ^1.0
gaarf/xml-to-php-array Version ^1.0
spatie/array-to-xml Version ^2.16