Download the PHP package beziworld/laravel-autenti without Composer

On this page you can find all versions of the php package beziworld/laravel-autenti. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-autenti

Laravel Autenti

tests Latest Version

Autenti electronic signatures for Laravel, built on the public Autenti Document Process API v2:

Polska wersja dokumentacji

Why this package

At the time of writing there was no PHP or Laravel client for Autenti on Packagist or GitHub (the similarly named autentique packages target an unrelated Brazilian service). Integrating the API by hand means implementing the RFC 7523 JWT assertion, the challenge-assertion action model with base64 headers, multipart uploads with typed parts and detached JWS verification against a JWKS. This package does all of that with the Laravel HTTP client (Http::fake works) and typed data objects.

The API is available for Autenti PRO, PREMIUM and ENTERPRISE plans.

Installation

The JWT bearer grant authenticates the user given by AUTENTI_USER_EMAIL, who must belong to the organisation of the API client. The assertion contains aud: autenti.com, email, email_verified: true, iat and a five minute exp; Autenti rejects assertions whose iat is more than 60 seconds off, so keep the server clock synchronised. Generate the key pair with openssl genrsa -out private.pem 2048 and openssl rsa -in private.pem -pubout and register the public key with Autenti.

Sending a document

Step by step: createDocument() creates a draft, addFile() / addFileFromPath() upload source files (20 MB in total), send() sends it. Drafts can be changed with updateDocument(), addParticipant(), removeParticipant() and removeFile(). Writes are never retried automatically.

Status, files and links

Callbacks and events

Register the package route once (the organisation may have up to 5 callbacks; the super administrator scope notification_management is required):

Autenti posts a JSON list of events with an x-jws-signature header. The route verifies the detached JWS with the key set of the environment (autenti.com/developers/keys/webhook.jwks or accept-webhook.jwks, cached for a day and fetched again on an unknown key) and dispatches:

Event Autenti event type
AutentiEventReceived every event
DocumentCompleted DOCUMENT_PROCESS_COMPLETED
DocumentRejected DOCUMENT_PROCESS_REJECTED
DocumentWithdrawn DOCUMENT_PROCESS_WITHDRAWN
DocumentExpired DOCUMENT_PROCESS_EXPIRED
SigningCompleted SIGNING_PROCESS_COMPLETED
ApprovalConsented APPROVAL_PROCESS_CONSENTED
ReviewCompleted REVIEW_PROCESS_COMPLETED
SigningHandedOver DOCUMENT_SIGNING_HANDED_OVER

Callbacks are tenant wide (documents sent from the Autenti UI arrive too) and are repeated until HTTP 2xx (immediately, after 30 minutes, 6 hours and 24 hours), so listeners must be idempotent. Forged callbacks get HTTP 403, malformed ones HTTP 400. For a custom route use Autenti::parseCallback($rawBody, $signatureHeader).

Many clients and users

Errors

Exception When
InvalidConfiguration missing client id, secret, user e-mail or private key; unknown grant, environment or connection; unusable key
AuthenticationFailed token request rejected (error() such as invalid_client, invalid_grant; requiresMultiFactor())
ApiException HTTP error with the Autenti type() (e.g. /error/resource-not-found), instance(), retryAfter(), or a connection failure
ChallengeRequired HTTP 403 with an X-Challenge the call did not answer; challenge() describes it
InvalidRequest data violates a documented constraint (e-mail, NIP, title, limit 128, offset 256, HTTPS callback)
InvalidCallback missing or invalid x-jws-signature, unknown key, malformed body

All extend AutentiException. Reads are retried on connection errors and HTTP 5xx; HTTP 429 is never retried automatically, as the API terms require.

Development

Tests generate throwaway RSA keys at runtime (phpseclib) and verify the callback example of the official documentation with the published production key.

Author

Created and maintained by Kamil Ćwiertnia, beziworld.eu.

Need an integration? Get in touch through beziworld.eu.

Other packages by the author

laravel-edoreczenia · laravel-ksef · laravel-fakturownia · laravel-comfino

License

MIT. See LICENSE.md. This package is not affiliated with Autenti sp. z o.o.


All versions of laravel-autenti with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
ext-openssl Version *
guzzlehttp/guzzle Version ^7.8
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package beziworld/laravel-autenti contains the following files

Loading the files please wait ...