定制 jdr/jws-ecdsa 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jdr/jws-ecdsa

最新稳定版本:0.4.1

Composer 安装命令:

composer require jdr/jws-ecdsa

包简介

ECDSA signers for lcobucci/jwt

README 文档

README

Latest Version on Packagist Software License Build Status Total Downloads

ECDSA signers for lcobucci/jwt.

This library was created in order to support mdanter/ecc 0.4.x in combination with lcobucci/jwt 3.x and will be deprecated once lcobucci/jwt itself offers support for this version of the mdanter/ecc library.

Instalation

Require the library with composer:

composer require jdr/jws-ecdsa

Usage

The signers supplied by this library are drop in replacements for the ones supplied by lcobucci/jwt.

use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Signer\Key;
use JDR\JWS\ECDSA\ES256;

$signer = new ES256();

$privateKey = new Key('file://...');

$token = (new Builder())
    ->setIssuedAt(time())
    ->setExpiration(time() + 3600)
    // ... Set additional claims
    ->sign($signer, $privateKey)
    ->getToken();

$publicKey = new Key('file://...');

$token->verify($signer, $publicKey);

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 3.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-18