Git Product home page Git Product logo

irma-requestor's Introduction

irmarequestor

irmarequestor can create signed JWT disclosure or issuance requests to send to an irma_api_server, for example using irma_js. It can be used to start IRMA attribute disclosure or issuance sessions with an IRMA mobile app.

Install using composer

composer require irma/requestor

Use

Create an instance:

include "vendor/autoload.php";
$requestor = new \IRMA\Requestor("Name", "id", "privatekey.pem");

The first two parameters identifiy your application to the IRMA app user and to the irma_api_server, respectively. The private key with which to sign the JWT must be stored in PEM format at the path specified by the third parameter.

Create a verification request:

$jwt = $requestor->getVerificationJwt([
	[
		"label" => "IRMATube member type",
		"attributes" => [ "irma-demo.IRMATube.member.type" ]
	]
]);

Create an issuance request:

$jwt = $requestor->getIssuanceJwt([
	[
		"credential" => "irma-demo.IRMATube.member",
		"attributes" => [ "type" => "regular", "id" => "2" ]
	]
]);

irma-requestor's People

Contributors

sietseringers avatar

Watchers

James Cloos avatar  avatar Martijn Kamphuis avatar Dibran Mulder avatar Rowan Goemans avatar  avatar Jasper avatar Leon Klute avatar Ivar Derksen avatar Bob Hageman 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.