All Projects → ionghitun → jwt-token

ionghitun / jwt-token

Licence: MIT License
Json web token generation and validation.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to jwt-token

IoT-Technical-Guide
🐝 IoT Technical Guide --- 从零搭建高性能物联网平台及物联网解决方案和Thingsboard源码分析 ✨ ✨ ✨ (IoT Platform, SaaS, MQTT, CoAP, HTTP, Modbus, OPC, WebSocket, 物模型,Protobuf, PostgreSQL, MongoDB, Spring Security, OAuth2, RuleEngine, Kafka, Docker)
Stars: ✭ 2,565 (+18221.43%)
Mutual labels:  token
crowdsale-smart-contract
No description or website provided.
Stars: ✭ 39 (+178.57%)
Mutual labels:  token
php7-alpine
Docker container for PHP 7 in Alpine Linux, with almost all extensions that you may need
Stars: ✭ 20 (+42.86%)
Mutual labels:  lumen
brauzie
Awesome CLI for fetching JWT tokens for OAuth2.0 clients
Stars: ✭ 14 (+0%)
Mutual labels:  token
yii2-jwt-user
JWT (JSON Web Token) User component for Yii 2
Stars: ✭ 16 (+14.29%)
Mutual labels:  token
tokensubscription.com
⏰💰🤠 Set-it-and-forget-it token subscriptions on the Ethereum mainnet. #Winner #WyoHackathon
Stars: ✭ 81 (+478.57%)
Mutual labels:  token
nodejs-wechat
基于nodejs开发微信公众号
Stars: ✭ 13 (-7.14%)
Mutual labels:  token
jwt-auth
JSON Web Token Authentication for Laravel and Lumen
Stars: ✭ 46 (+228.57%)
Mutual labels:  lumen
Licensy
Discord bot that manages expiration of roles with subscriptions!
Stars: ✭ 47 (+235.71%)
Mutual labels:  expiration
axios-token-interceptor
An interceptor which makes it easier to work with tokens in axios.
Stars: ✭ 34 (+142.86%)
Mutual labels:  token
horse-jwt
Middleware for JWT in HORSE
Stars: ✭ 39 (+178.57%)
Mutual labels:  token
XGoServer
一个基础性、模块完整且安全可靠的轻量级 Go 服务端框架
Stars: ✭ 21 (+50%)
Mutual labels:  token
lumen-api-skeleton
Lumen API skeleton with JWT to manager tokens, Socialite to OAuth Providers, MongoDB driver and Predis to Redis cache storage.
Stars: ✭ 22 (+57.14%)
Mutual labels:  lumen
auth-flow-react-apollo-saga
Full stack login/register flow with React, Apollo, Redux, Redux-saga and MongoDB.
Stars: ✭ 22 (+57.14%)
Mutual labels:  token
EL1T3
🖤 Ƭ𝘩𝘦 𝘮𝘰𝘴𝘵 𝘱𝘰𝘸𝘦𝘳𝘧𝘶𝘭𝘭 𝘢𝘯𝘥 𝘉𝘦𝘵𝘵𝘦𝘳 𝘵𝘰𝘬𝘦𝘯 𝘴𝘵𝘦𝘢𝘭𝘦𝘳.
Stars: ✭ 41 (+192.86%)
Mutual labels:  token
retainer
Minimal async cache in Rust with support for key expirations
Stars: ✭ 23 (+64.29%)
Mutual labels:  expiration
ItroublveTSC
Official Source of ItroublveTSC, totally open source. No virus or anything. Feel free to have a look :)
Stars: ✭ 82 (+485.71%)
Mutual labels:  token
jwtauth-plugin
JWTAuth Plugin for WinterCMS
Stars: ✭ 25 (+78.57%)
Mutual labels:  token
tokenizr
String Tokenization Library for JavaScript
Stars: ✭ 70 (+400%)
Mutual labels:  token
AspNetCore.Weixin
An ASP.NET Core middleware for Wechat/Weixin message handling and apis. (微信公众平台/接口调用服务)
Stars: ✭ 24 (+71.43%)
Mutual labels:  token

Latest Stable Version Build Status Total Downloads Scrutinizer Code Quality License

Jwt Token

Json web token generation and validation.

Instalation notes

$ composer require ionghitun/jwt-token

Dependencies

  • php >= 7.3

Documentation:

You need to add JWT_SECRET to your .env file.

Import Jwt from IonGhitun\JwtToken

  • use Jwt::generateToken($payload) to generate a token, $payload should be an array.
  • use Jwt::validateToken($token) to validate a token.

Validity of the token is default one day. It can be overwritten by adding expiration to $payload:

    $payload['expiration'] = Carbon::now()->addDay()->format('Y-m-d H:i:s');

In case $token is not a valid Jwt token, expired or could not verify signature with secret a IonGhitun\JwtToken\Exceptions\JwtException will be thrown on validateToken method.

Happy coding!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].