reflect-io / reflect-php
Reflect API client library for PHP
v0.1.0
2018-05-02 00:11 UTC
Requires
- php: ^7.1
- ramsey/uuid: ^3.7
- web-token/jwt-core: ^1.1
- web-token/jwt-encryption: ^1.1
- web-token/jwt-key-mgmt: ^1.1
Requires (Dev)
- phpstan/phpstan: ^0.9.2
- phpstan/phpstan-phpunit: ^0.9.4
- phpunit/phpunit: ^7.1
- web-token/jwt-checker: ^1.1
This package is not auto-updated.
Last update: 2025-04-03 15:54:25 UTC
README
Installation
$ composer require reflect-io/reflect-php
Generating user tokens
use Reflect\Project\Token; $accessKey = 'd232c1e5-6083-4aa7-9042-0547052cc5dd'; $secretKey = '74678a9b-685c-4c14-ac45-7312fe29de06'; $parameter = new Token\Parameter( 'user-id', Token\Parameter\Op::EQUALS, '1234' ); $token = (new Token\Builder($accessKey)) ->setAttribute('user-id', 1234) ->setAttribute('user-name', 'Billy Bob') ->addParameter($parameter) ->build($secretKey);