Giter Club home page Giter Club logo

smart-id-php-client's Introduction

Build Status License: LGPL v3

Smart-ID PHP client

Introduction

The Smart-ID PHP client can be used for easy integration of the Smart-ID solution to information systems or e-services.

Features

  • Simple interface for user authentication

Smart-ID PHP client works with PHP 7.2 or later.

This PHP client cannot be used to create digitally signed containers because PHP does not have a library like DigiDoc4J..

Installation

The recommended way to install Smart-ID PHP Client is through Composer:

composer require sk-id-solutions/smart-id-php-client "~1.0"

Https pinning

The client automatically trusts sk demo and live env public keys

Examples of configuring

When not specified the client will trust SK live and demo env keys
$this->client = new Client();
$this->client
  ->setRelyingPartyUUID( "YOUR UUID" )
  ->setRelyingPartyName( "YOUR RP NAME" )
  ->setHostUrl("HOST_URL");
Trusting only live env public keys
$this->client = new Client();
$this->client
  ->setRelyingPartyUUID( "YOUR UUID" )
  ->setRelyingPartyName( "YOUR RP NAME" )
  ->setHostUrl("HOST_URL")
  ->useOnlyLivePublicKey();
Trusting only demo env public keys
$this->client = new Client();
$this->client
  ->setRelyingPartyUUID( "YOUR UUID" )
  ->setRelyingPartyName( "YOUR RP NAME" )
  ->setHostUrl("HOST_URL")
  ->useOnlyDemoPublicKey();

Trusting custom public keys

$this->client = new Client();
$this->client
  ->setRelyingPartyUUID( "YOUR UUID" )
  ->setRelyingPartyName( "YOUR RP NAME" )
  ->setHostUrl("HOST_URL")
  ->setPublicSslKeys("sha256//+Tz0G7u3vgcaw/o32vIoCNNjpfo8UugQEXmWkrCuc4o=;sha256//wkdgNtKpKzMtH/zoLkgeScp1Ux4TLm3sUldobVGA/g4=");

How to use it

Take a look at the examples

smart-id-php-client's People

Contributors

alvar-sk avatar donrico avatar holystix avatar jalukse avatar jeserkin avatar mikk125 avatar sk-natalja avatar

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.