Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/e-identification/bankid-php
BankID SDK
https://github.com/e-identification/bankid-php
asynchronous bank-id bankid client php php71 reactive-programming sdk
Last synced: about 1 month ago
JSON representation
BankID SDK
- Host: GitHub
- URL: https://github.com/e-identification/bankid-php
- Owner: e-identification
- License: mit
- Created: 2018-10-13T07:42:20.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-21T19:29:27.000Z (over 5 years ago)
- Last Synced: 2024-09-29T19:41:27.178Z (about 2 months ago)
- Topics: asynchronous, bank-id, bankid, client, php, php71, reactive-programming, sdk
- Language: PHP
- Homepage:
- Size: 66.4 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BankID SDK library
A SDK for providing BankID services as a RP (Relying party).
Supports the latest v5 features.
[![PHP7.1 Ready](https://img.shields.io/badge/PHP71-ready-green.svg)][link-packagist]
[![Latest Stable Version](https://poser.pugx.org/nicklasw/bankid-sdk/v/stable)](https://packagist.org/packages/nicklasw/bankid-sdk)
[![Latest Unstable Version](https://poser.pugx.org/nicklasw/bankid-sdk/v/unstable)](https://packagist.org/packages/nicklasw/bankid-sdk)
[![Build Status](https://travis-ci.org/NicklasWallgren/bankid-sdk.svg?branch=master)](https://travis-ci.org/NicklasWallgren/bankid-sdk)
[![License](https://poser.pugx.org/nicklasw/bankid-sdk/license)](https://packagist.org/packages/nicklasw/bankid-sdk)# Installation
The library can be installed through `composer`
```bash
composer require nicklasw/bankid-sdk
```# Features
- Supports all v5 features
- Supports asynchronous and parallel requests# Examples
## Initiate authenticate request
```php
$client = new Client(new Config());$authenticationResponse = $client->authenticate(new AuthenticationPayload(, ));
if (!$authenticationResponse->isSuccess()) {
var_dump($authenticationResponse->getErrorCode(), $authenticationResponse->getDetails());return;
}$collectResponse = $authenticationResponse->collect();
```## Execute parallel requests
```php
$client = new ClientAsynchronous(new Config());$promises[] = $client->authenticate(new AuthenticationPayload(, ));
$promises[] = $client->authenticate(new AuthenticationPayload(, ));// Parallel requests, authenticate users
foreach (unwrap($promises) as $result) {
/**
* @var AuthenticationResponse $result
*/
var_dump($result->isSuccess());
}
```# Certificates
The web service API can only be accessed by a RP that has a valid SSL client certificate. The RP certificate is obtained from the
bank that the RP has purchased the BankID service from.## Generate PEM certificate
```bash
openssl pkcs12 -in .pfx -out .pem -nodes
```## Docker
```bash
make && make bash
```## Unit tests
```bash
composer run test
```## Contributing
- Fork it!
- Create your feature branch: `git checkout -b my-new-feature`
- Commit your changes: `git commit -am 'Useful information about your new features'`
- Push to the branch: `git push origin my-new-feature`
- Submit a pull request## Contributors
- [Nicklas Wallgren](https://github.com/NicklasWallgren)
- [All Contributors][link-contributors][ico-downloads]: https://img.shields.io/packagist/dt/nicklasw/bankid-sdk.svg?style=flat-square
[link-packagist]: https://packagist.org/packages/nicklasw/bankid-sdk
[link-contributors]: ../../contributors