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.
composer require irma/requestor
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" ]
]
]);