Code Monkey home page Code Monkey logo

bank-id's People

Contributors

dimafe6 avatar jongotlin avatar perifer avatar puggan avatar sebastiansson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bank-id's Issues

verify = false?

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',
    ]
);

cleanSSn

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;

Custom json parameters in getAuthResponse method

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.

Error: Class 'Dimafe6\BankID\Service\Controller' not found

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,

  1. Added the package via using composer command
  2. Created the Controller file to access the sign-in method.

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

Why not merge into Master?

The latest update to dev solves a big issue with authenticating without personalnumber. This version should be merged into master, right?

Update repository to 2.0.1 latest version?

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).

BankID API v5

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.