pondit / jwt
1.1.0
2020-02-07 06:53 UTC
Requires
- php: ^7.2
- firebase/php-jwt: ^5.0
- swiftmailer/swiftmailer: @stable
This package is auto-updated.
Last update: 2024-09-17 19:26:12 UTC
README
关于 Pondit JWT
Pondit JWT 是一个简单的库,用于在 PHP 中编码和解码 JSON Web Tokens (JWT),符合 RFC 7519 标准。
如何使用
将 config/constants.example.php 复制到 config/constants.php
数据库配置 config/constants.php
define('DB_HOST', ''); define('DB_NAME', ''); define('DB_USERNAME', ''); define('DB_PASSWORD', ');
首先在数据库中创建一个 users(id, name, mobile_number, email, password, is_active) 表。根据您的数据库凭据更新 config/constants.php
可用的 API(仅接受 POST 请求)
domain/register.php
(表单数据:name, email, mobile_number, password)domain/login.php
(表单数据:email, password)domain/profile.php
content-type: application/json, Authorization: bearer tokendomain/send_sms.php
(表单数据:secret_key, mobile_number, message)domain/send_email.php
(表单数据:secret_key, email, subject, body)
贡献
感谢您考虑为 Pondit JWT 贡献!
安全漏洞
如果您在 Pondit JWT 中发现安全漏洞,请通过 dev1@pondit.com 发送电子邮件给开发团队。所有安全漏洞都将得到及时解决。
许可证
Pondit JWT 是开源软件,遵循 MIT 许可。