phpjwt 第三方库生成token验证,也可以做公钥,私钥的验证方法。

我的框架版本库是:https://github.com/liuf121032/LFFrame  ,欢迎大家一起研究小小demo学习。

此方法对应路由:http://local.lff.com/index.php?d=fwt&c=fwt/test 

需要注意的:1.如果直接使用composer require 安装phpjwt,不能正常使用new builder()这个方法,此方法安装的phpjwt是对象文件,builder是一个对象。

此时安装,需要去github下载release版本,此时下载的版本中builder是一个实现的方法,可以正常使用。具体demo,在我开发的框架router层中可以看到。

 

原贴的使用方法:https://blog.csdn.net/HobHunter/article/details/78524922

原文地址:https://www.cnblogs.com/iifeng/p/11474750.html