guilhermetome/jwt 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

guilhermetome/jwt

Composer 安装命令:

composer require guilhermetome/jwt

包简介

A simple jwt class

README 文档

README

Scrutinizer Code Quality GitHub last commit GitHub repository size Build Status Code Intelligence Status

This project is just a simple JWT class to add to your project and can be configured using contants.

Summary

Prerequisites

  • PHP >= 7.2
  • Composer

Installing

You can clone the project with this command:

  • Clone repository:
git clone https://github.com/GuilhermeTome/jwt
  • Install in your project:
composer require guilhermetome/jwt

How to use

  • Only follow the docs.

Declare the jwt key

  • In you application you need to create a const like this:
<?php

// the key of the application
define('JWT_SECRET', 'mysecret');

// the hash of the jwt
define('JWT_HASH', 'sha256');

// the alg to put in header
define('JWT_ALG', 'HS256');

Generate the jwt key

  • @param array
  • @return string
<?php

use GuilhermeTome\Jwt;

echo Jwt::encode([
    'user' => 'Guilherme',
    'email' => 'email@gmail.com',
    'pass' => 'MyPassword'
]);

Decode the jwt key

  • @param string
  • @return array|false
<?php

use GuilhermeTome\Jwt;

echo Jwt::decode($key);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

This project is licensed under the MIT Licence - see the MIT Licence for more details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固