viniciusrbezerra/autentique

A quick and easy AUTENTIQUE integration library that can be used to create new documents, folders and make signatures directly from your application

1.0.1 2021-12-05 16:41 UTC

This package is auto-updated.

Last update: 2024-09-15 20:00:15 UTC


README

Source Code PHP from Packagist Latest Version Software License Build Quality Score Total Downloads

Autentique is a website for signing documents online and this is an API for seamless integration with the website.

Autentique é um site para assinar documentos online e está é uma API para integração de maneira transparente com o site.

Highlights

  • Simple installation (Instalação simples)
  • Abstraction of all API methods (Abstração de todos os métodos da API)
  • Composer ready and PSR-2 compliant (Pronto para o composer e compatível com PSR-2)

Installation

Uploader is available via Composer:

"viniciusrbezerra/autentique": "^1.0"

or run

composer require viniciusrbezerra/autentique

Documentation

For details on how to use, see a sample folder in the component directory. In it you will have an example of use for each class. It works like this:

Para mais detalhes sobre como usar, veja uma pasta de exemplo no diretório do componente. Nela terá um exemplo de uso para cada classe. Ele funciona assim:

User endpoint:

Add your application configuration to a .env file in the root of your project. Make sure the .env file is added to your .gitignore so it is not checked-in the code

AUTENTIQUE_TOKEN="YOUR TOKEN HERE"
AUTENTIQUE_DEV_MODE="true or false"
<?php

require __DIR__."/../vendor/autoload.php";

$document = new \Autentique\Document();
$folder = new \Autentique\Folder();

/**
 * Create Document
 */
$document = (new \Autentique\Document())->createDocument(
    "document_name",
    [
        ["email" => "email@gmail.com", "action" => "SIGN"],
    ],
    "path_to_document"
);

/**
 * Create Folder
 */
$createdFolder = $folder->createFolder("folder_name");

/**
 * Move document to folder
 */
$moveFile = (new \Autentique\Document())->moveDocumentToFolder($document->callback()->createDocument->id, $createdFolder->callback()->createFolder->id);

/**
 * Sign the document
 */
$sign = (new \Autentique\Document())->signDocument($document->callback()->createDocument->id);

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.