Download the PHP package sausin/signere-sdk without Composer

On this page you can find all versions of the php package sausin/signere-sdk. 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 signere-sdk

Signere SDK

Latest Version on Packagist Build Status Quality Score Scrutinizer Coverage StyleCI Total Downloads License: MIT

Signere provides APIs to perform authentication and signing of documents using various identification systems.

This package uses the publicly available API documentation provided by Signere and makes it easy to work with those APIs.

While it's created to work well with Laravel, it's possible to use the functionality of the package with any setup in PHP. An implementation of Illuminate\Contracts\Config\Repository is required in non-laravel environments to provide the configuration inputs for the package.

Laravel handles dependency injection using its powerful service container. If this package is used without Laravel, your application needs to manage the dependency injection on its own and inject the relevant classes.

Note that the controllers, service provider, routes and resources can only be used with Laravel.

Installing

Install via composer:

When using the package with Laravel 5.5 and upwards, the service provider will automatically be registered. For Laravel 5.4, the service provider needs to be registered in the config/app.php file as below:

The config file should be published using the below artisan command:

The config file has the following keys setup for the package to function correctly:

Pre-requisites

Keys

The .env file in the project this SDK is used in should have the following keys defined:

These keys are provided by Signere when you register yourself with them.

If you're using this package without Laravel, then the these variables need to be provided by an implementation of Illuminate\Contracts\Config\Repository. This is injected to the respective classes where required.

SSL

Your application needs to have an operational SSL configuration. This is required for bankID to work correctly, in iframe setups.

Usage

To make API calls, appropriate headers need to be set to signere can verify your requests are authentic. This is automatically taken care of by the Header class in this package. The specifications in Signere documentation for required headers in API calls have been used.

Access Control with Laravel

If the package is used with Laravel, routes are automatically registered. Refer to the routes/api.php in this package to see all the available routes.

The routes are split into four groups - admin, user, guest and bidder. Access control is made possible by the Signere class which can be setup in the AppServiceProvider of the application using this package. An example is shown below:

Each controller's constructor method calls Authenticate middleware, which in turn calls the Signere class to check if the request is to be authenticated.

Most of the routes are organized under admin group as there is a cost to the operations performed.

Utilizing Authentication Services

The workflow for authentication is like this:

Utilizing Signing Services

Signing can be performed in two ways:

The first method means that you create a document available for signing and distribute the URLs to the signees yourself.

In the second method, Signere does the hard work for you. You basically setup a process with Signere which sends out the notifications to signees. It is also possible to automate reminders.

... ...

Tips

Laravel supports real time facades (since 5.4).

This can be very useful when you want to use a class from this package with injected dependencies and be able to test your own app's code. Read more about Laravel facades here.

Further, this can also be useful in tinker to check if you are getting correct responses. For example on a tinker console:

gets you an encryption key from Signere, corresponding to your setup! Also,

will give you the URL being used by the package. If you're in test/local environment, this will return https://testapi.signere.no/api/events/encryptionkey and https://api.signere.no/api/events/encryptionkey if you're in production.

Commands

This package ships with the artisan command signere:renew. It accepts an optional argument --key= which is either primary or secondary.

If nothing is specified, it uses primary. This is useful to renew your signere keys and can be combined with the powerful scheduler that Laravel comes with so you don't have to worry about renewing your keys. Just set it up for renewal and forget about it :)

Credits

Trademarks

All trademarks belong to their respective owners


All versions of signere-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
guzzlehttp/guzzle Version ^6.3
illuminate/contracts Version 5.4.*|5.5.*
jakeasmith/http_build_url Version ^1.0
nesbot/carbon Version ~1.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 sausin/signere-sdk contains the following files

Loading the files please wait ....