引入jwt包

This commit is contained in:
hdm 2021-07-13 16:52:47 +08:00
parent 220192e54d
commit b947d2f2ff
5 changed files with 89 additions and 52 deletions

2
.gitignore vendored
View File

@ -2,6 +2,6 @@
/.vscode /.vscode
/.gitee /.gitee
*.log *.log
*.ini
/.env /.env
/public/.user.ini
/config/install.lock /config/install.lock

View File

@ -1,42 +0,0 @@
sudo: false
language: php
branches:
only:
- stable
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
install:
- composer install --no-dev --no-interaction --ignore-platform-reqs
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip .
- composer require --update-no-dev --no-interaction "topthink/think-image:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0"
- composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0"
- composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0"
- zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip .
script:
- php think unit
deploy:
provider: releases
api_key:
secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw=
file:
- ThinkPHP_Core.zip
- ThinkPHP_Full.zip
skip_cleanup: true
on:
tags: true

View File

@ -26,7 +26,8 @@
"topthink/think-multi-app": "^1.0", "topthink/think-multi-app": "^1.0",
"topthink/think-view": "^1.0", "topthink/think-view": "^1.0",
"topthink/think-captcha": "^3.0", "topthink/think-captcha": "^3.0",
"phpmailer/phpmailer": "^6.3" "phpmailer/phpmailer": "^6.3",
"lcobucci/jwt": "^3.4"
}, },
"require-dev": { "require-dev": {
"symfony/var-dumper": "^4.2", "symfony/var-dumper": "^4.2",

85
composer.lock generated
View File

@ -4,8 +4,91 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "a370397ef9edcd1604ce0397d6c4e36e", "content-hash": "639a11a94abffa740c69d4c2d53bc478",
"packages": [ "packages": [
{
"name": "lcobucci/jwt",
"version": "3.4.5",
"source": {
"type": "git",
"url": "https://github.com/lcobucci/jwt.git",
"reference": "511629a54465e89a31d3d7e4cf0935feab8b14c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/lcobucci/jwt/zipball/511629a54465e89a31d3d7e4cf0935feab8b14c1",
"reference": "511629a54465e89a31d3d7e4cf0935feab8b14c1",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-mbstring": "*",
"ext-openssl": "*",
"php": "^5.6 || ^7.0"
},
"require-dev": {
"mikey179/vfsstream": "~1.5",
"phpmd/phpmd": "~2.2",
"phpunit/php-invoker": "~1.1",
"phpunit/phpunit": "^5.7 || ^7.3",
"squizlabs/php_codesniffer": "~2.3"
},
"suggest": {
"lcobucci/clock": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
}
},
"autoload": {
"psr-4": {
"Lcobucci\\JWT\\": "src"
},
"files": [
"compat/class-aliases.php",
"compat/json-exception-polyfill.php",
"compat/lcobucci-clock-polyfill.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Luís Otávio Cobucci Oblonczyk",
"email": "lcobucci@gmail.com",
"role": "Developer"
}
],
"description": "A simple library to work with JSON Web Token and JSON Web Signature",
"keywords": [
"JWS",
"jwt"
],
"support": {
"issues": "https://github.com/lcobucci/jwt/issues",
"source": "https://github.com/lcobucci/jwt/tree/3.4.5"
},
"funding": [
{
"url": "https://github.com/lcobucci",
"type": "github"
},
{
"url": "https://www.patreon.com/lcobucci",
"type": "patreon"
}
],
"time": "2021-02-16T09:40:01+00:00"
},
{ {
"name": "league/flysystem", "name": "league/flysystem",
"version": "1.1.3", "version": "1.1.3",

View File

@ -1,20 +1,15 @@
<?php <?php
return [ return [
// 默认使用的数据库连接配置 // 默认使用的数据库连接配置
'default' => 'mysql', 'default' => 'mysql',
// 自定义时间查询规则 // 自定义时间查询规则
'time_query_rule' => [], 'time_query_rule' => [],
// 自动写入时间戳字段 // 自动写入时间戳字段
// true为自动识别类型 false关闭 // true为自动识别类型 false关闭
// 字符串则明确指定时间字段类型 支持 int timestamp datetime date // 字符串则明确指定时间字段类型 支持 int timestamp datetime date
'auto_timestamp' => true, 'auto_timestamp' => true,
// 时间字段取出后的默认时间格式 // 时间字段取出后的默认时间格式
'datetime_format' => 'Y-m-d H:i:s', 'datetime_format' => 'Y-m-d H:i:s',
// 数据库连接配置信息 // 数据库连接配置信息
'connections' => [ 'connections' => [
'mysql' => [ 'mysql' => [
@ -23,9 +18,9 @@ return [
// 服务器地址 // 服务器地址
'hostname' => '127.0.0.1', 'hostname' => '127.0.0.1',
// 数据库名 // 数据库名
'database' => 'dev5_gougucms', 'database' => 'cms',
// 用户名 // 用户名
'username' => 'dev5_gougucms', 'username' => 'root',
// 密码 // 密码
'password' => '123456', 'password' => '123456',
// 端口 // 端口