2017 © Pedro Peláez
 

library php-jwt-service

Simple service for work with jwt tokens

image

alexpts/php-jwt-service

Simple service for work with jwt tokens

  • Friday, May 18, 2018
  • by alexpts
  • Repository
  • 1 Watchers
  • 0 Stars
  • 33 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 14 % Grown

The README.md

php-jwt-service

Build Status Code Coverage Code Climate Scrutinizer Code Quality, (*1)

Simple service with work JWT tokens., (*2)

Install

composer require alexpts/php-jwt-service, (*3)

Demo

<?php
use Emarref\Jwt\Algorithm\Hs512;
use PTS\JwtService\JwtService;

$secret = 'sa#FD423efdl#';
$alg = new Hs512($secret);

$service = new JwtService($alg);
$jwtToken = $service->encode(['userId' => 1]);

// with auto expire
$service->setExpire(3600);
$jwtToken2 = $service->encode(['userId' => 1]);


$jwtToken3 = 'some string jst token';
$tokenObject = $service->decode($jwtToken3);

The Versions

18/05 2018

dev-master

9999999-dev https://github.com/alexpts/php-jwt-service

Simple service for work with jwt tokens

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar alexpts

jwt token

18/05 2018

1.1.0

1.1.0.0 https://github.com/alexpts/php-jwt-service

Simple service for work with jwt tokens

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar alexpts

jwt token

15/04 2018

1.0.0

1.0.0.0 https://github.com/alexpts/php-jwt-service

Simple service for work with jwt tokens

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar alexpts

jwt token