dimafe6 / bank-id Goto Github PK
View Code? Open in Web Editor NEWBankID
License: MIT License
BankID
License: MIT License
Why is verify turned of in the exemple in the readme?
I using your code with verify, like this
// Create BankIDService
$bankIDService = new BankIDService(
'https://appapi2.test.bankid.com/rp/v5/',
$_SERVER["REMOTE_ADDR"],
[
'verify' => 'PATH_TO_TEST_CERT.ca',
'cert' => 'PATH_TO_TEST_CERT.crt',
'ssl_key' => 'PATH_TO_TEST_CERT.key',
]
);
Could you possibly create a release for the latest master that has guzzle 7 support?
I was upgrading PHP version in my server and it started showing some deprecation warnings that are hidden by adding
#[\AllowDynamicProperties]
To the class of AbstractResponseModel
When year is 2019 this is failing adding 20 in front
private function cleanSsn($ssn)
{
$ssn = preg_replace("/[^0-9]/", "", $ssn);
$split = substr($ssn, 0, 2);
if ($split != 19 && $split > date('y')) {
$ssn = '19' . $ssn;
}
if ($split != 20 && $split <= date('y')) {
$ssn = '20' . $ssn;
}
return $ssn;
#58 in BankIDService.php; "personalNumber" is optional while authenticating. This relies on paragraph "14.1.1 Parameters for auth and sign" from https://www.bankid.com/assets/bankid/rp/bankid-relying-party-guidelines-v3.2.2.pdf.
Suggestion; Just check if the $personalNumber not is null, if not, include it in the parameters.
It would be great to have support for setting custom json parameters on the POST request in the getAuthResponse
method. That way we could specify requirement
parameters like tokenStartRequired
when initiating an auth.
I'm getting an error in my file which says Error: Class 'Dimafe6\BankID\Service\Controller' not found
I'm using this project in a Laravel framework version is 7,
Here what I did so far,
When I try to test that controller file I'm getting that error.
Source file
<?php
namespace App\Http\Controllers;
namespace Dimafe6\BankID\Service;
use Illuminate\Http\Request;
class BankID extends Controller
{
public function signin(){
// Create BankIDService
$bankIDService = new BankIDService(
'https://appapi2.test.bankid.com/rp/v5/',
$_SERVER["REMOTE_ADDR"],
[
'verify' => false,
'cert' => 'PATH_TO_TEST_CERT.pem',
]
);
// Signing. Step 1 - Get orderRef
/** @var OrderResponse $response */
$response = $bankIDService->getSignResponse('my test code', 'User visible data');
// Signing. Step 2 - Collect orderRef.
// Repeat until $collectResponse->status !== CollectResponse::STATUS_COMPLETED
$collectResponse = $bankIDService->collectResponse($response->orderRef);
if($collectResponse->status === CollectResponse::STATUS_COMPLETED) {
return true; //Signed successfully
}
}
public function test(){
return "hello";
}
}
There is a folder in vendor folder which name dimafe6
The latest update to dev solves a big issue with authenticating without personalnumber. This version should be merged into master, right?
Hello and thank you for a great repository, but Im having problem not being able to download the latest code that includes the optional use of PersonNumber when using "getAuthResponse". When I try to use dev-master or 2.0.0 im still getting the old codes from 1.0 (From what I can see).
Version 5 of the API is a JSON REST API.
And also support the cancel-command.
Have a working version at:
https://github.com/puggan/bank-id
But have no good idea how to merge them without breaking the current implementations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.