Skip to content

Commit ec1ae7b

Browse files
authored
Merge branch 'tymondesigns:develop' into develop
2 parents 7b648b5 + ab00f2d commit ec1ae7b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+674
-886
lines changed
File renamed without changes.

.github/workflows/phpunit.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: PHPUnit tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
release:
7+
types:
8+
- published
9+
10+
jobs:
11+
php-tests:
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: [7.2, 7.3, 7.4, 8.0]
18+
laravel: [6.*, 7.*, 8.*]
19+
os: [ubuntu-latest]
20+
coverage: [none]
21+
include:
22+
- php: 8.0
23+
laravel: 8.*
24+
os: ubuntu-latest
25+
coverage: xdebug
26+
exclude:
27+
- php: 7.2
28+
laravel: 8.*
29+
30+
name: '[P${{ matrix.php }}] [L${{ matrix.laravel }}] [${{ matrix.coverage }}]'
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v1
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php }}
40+
extensions: mbstring json openssl
41+
coverage: ${{ matrix.coverage }}
42+
ini-values: memory_limit=-1
43+
44+
- name: Get composer cache directory
45+
id: composer-cache
46+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
47+
48+
- name: Cache dependencies
49+
uses: actions/cache@v2
50+
with:
51+
path: ${{ steps.composer-cache.outputs.dir }}
52+
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
53+
restore-keys: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
54+
55+
- name: Install dependencies
56+
run: |
57+
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-progress --no-update
58+
composer update --no-progress --prefer-dist --no-interaction --no-suggest
59+
60+
- name: Execute tests
61+
run: composer test:ci
62+
63+
- name: Upload coverage
64+
uses: codecov/codecov-action@v1
65+
if: matrix.coverage == 'xdebug'
66+
with:
67+
token: ${{ secrets.CODECOV_TOKEN }}
68+
file: ./coverage.xml
69+
yml: ./codecov.yml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
composer.lock
33
build
44
coverage.xml
5+
.phpunit.result.cache

.styleci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
preset: laravel
22

33
enabled:
4-
- is_null
54
- no_useless_else
65
- phpdoc_order
76
- phpdoc_separation
87
- unalign_double_arrow
8+
# - length_ordered_imports

.travis.yml

Lines changed: 0 additions & 131 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
![jwt-auth-banner](https://cloud.githubusercontent.com/assets/1801923/9915273/119b9350-5cae-11e5-850b-c941cac60b32.png)
22

3-
[![Build Status](http://img.shields.io/travis/tymondesigns/jwt-auth/master.svg?style=flat-square)](https://travis-ci.org/tymondesigns/jwt-auth)
4-
[![Codecov branch](https://img.shields.io/codecov/c/github/tymondesigns/jwt-auth/develop.svg?style=flat-square)](https://codecov.io/github/tymondesigns/jwt-auth)
3+
[![PHPUnit](https://github.com/tymondesigns/jwt-auth/workflows/PHPUnit%20tests/badge.svg)](https://travis-ci.org/tymondesigns/jwt-auth)
4+
[![Codecov branch](https://img.shields.io/codecov/c/github/tymondesigns/jwt-auth/develop.svg?style=flat-square&logo=codecov)](https://codecov.io/github/tymondesigns/jwt-auth)
55
[![StyleCI](https://styleci.io/repos/23680678/shield?style=flat-square)](https://styleci.io/repos/23680678)
6-
[![Latest Version](http://img.shields.io/packagist/v/tymon/jwt-auth.svg?style=flat-square)](https://packagist.org/packages/tymon/jwt-auth)
7-
[![Latest Dev Version](https://img.shields.io/packagist/vpre/tymon/jwt-auth.svg?style=flat-square)](https://packagist.org/packages/tymon/jwt-auth#dev-develop)
8-
[![Monthly Downloads](https://img.shields.io/packagist/dm/tymon/jwt-auth.svg?style=flat-square)](https://packagist.org/packages/tymon/jwt-auth)
9-
[![Dependency Status](https://www.versioneye.com/php/tymon:jwt-auth/dev-develop/badge?style=flat-square)](https://www.versioneye.com/php/tymon:jwt-auth/dev-develop)
10-
[![PHP-Eye](https://php-eye.com/badge/tymon/jwt-auth/tested.svg?style=flat-square)](https://php-eye.com/package/tymon/jwt-auth)
6+
[![Latest Version](http://img.shields.io/packagist/v/tymon/jwt-auth.svg?style=flat-square&logo=composer)](https://packagist.org/packages/tymon/jwt-auth)
7+
[![Latest Dev Version](https://img.shields.io/packagist/vpre/tymon/jwt-auth.svg?style=flat-square&logo=composer)](https://packagist.org/packages/tymon/jwt-auth#dev-develop)
8+
[![Monthly Downloads](https://img.shields.io/packagist/dm/tymon/jwt-auth.svg?style=flat-square&logo=composer)](https://packagist.org/packages/tymon/jwt-auth)
119

1210
## Documentation
1311

14-
For version `0.5.*` See the [WIKI](https://github.com/tymondesigns/jwt-auth/wiki) for documentation.
12+
Documentation for `1.*` [here](http://jwt-auth.com)
1513

16-
Documentation for `1.0.0` is coming soon, but there is an unfinished guide [here](http://jwt-auth.readthedocs.io)
14+
For version `0.5.*` See the [WIKI](https://github.com/tymondesigns/jwt-auth/wiki) for documentation.
1715

1816
[<img src="https://user-images.githubusercontent.com/1801923/57975478-a7a88900-79c1-11e9-924b-d7fa742f743b.png" height="40">](https://www.patreon.com/bePatron?u=11815122)
1917

2018
-----------------------------------
2119

2220
### Supported by Auth0 <span><img src="https://user-images.githubusercontent.com/1801923/31792116-d4fca9ec-b512-11e7-92eb-56e8d3df8e70.png" height="28" align="top"></span>
2321

24-
If you want to easily add secure authentication to Laravel apps, feel free to check out Auth0's SDK and free plan at [auth0.com/overview](https://auth0.com/overview?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=jwt-auth&utm_content=auth)
22+
If you want to easily add secure authentication to Laravel apps, feel free to check out Auth0's SDK and free plan at [auth0.com/developers](https://auth0.com/developers?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=jwt-auth&utm_content=auth)
2523

2624
## Security
2725

@@ -31,6 +29,4 @@ If you discover any security related issues, please email [email protected] ins
3129

3230
The MIT License (MIT)
3331

34-
[![Beerpay](https://beerpay.io/tymondesigns/jwt-auth/badge.svg)](https://beerpay.io/tymondesigns/jwt-auth)
35-
36-
[![SensioLabs Insight](https://insight.sensiolabs.com/projects/ba600082-7869-4ea8-b877-0bf6a86d4988/small.png)](https://insight.sensiolabs.com/projects/ba600082-7869-4ea8-b877-0bf6a86d4988)
32+
[![SensioLabs Insight](https://insight.sensiolabs.com/projects/ba600082-7869-4ea8-b877-0bf6a86d4988/big.svg)](https://insight.sensiolabs.com/projects/ba600082-7869-4ea8-b877-0bf6a86d4988)

composer.json

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^5.5.9|^7.0",
27-
"illuminate/auth": "^5.1|^6",
28-
"illuminate/contracts": "^5.1|^6",
29-
"illuminate/http": "^5.1|^6",
30-
"illuminate/support": "^5.1|^6",
31-
"lcobucci/jwt": "^3.2",
26+
"php": "^7.2|^8.0",
27+
"illuminate/auth": "^5.2|^6|^7|^8",
28+
"illuminate/contracts": "^5.2|^6|^7|^8",
29+
"illuminate/http": "^5.2|^6|^7|^8",
30+
"illuminate/support": "^5.2|^6|^7|^8",
31+
"lcobucci/jwt": "<3.4",
3232
"namshi/jose": "^7.0",
3333
"nesbot/carbon": "^1.0|^2.0"
3434
},
3535
"require-dev": {
36-
"cartalyst/sentinel": "^2|^3",
37-
"illuminate/console": "^5.1|^6",
38-
"illuminate/database": "^5.1|^6",
39-
"illuminate/routing": "^5.1|^6",
36+
"illuminate/console": "^5.2|^6|^7|^8",
37+
"illuminate/database": "^5.2|^6|^7|^8",
38+
"illuminate/routing": "^5.2|^6|^7|^8",
4039
"mockery/mockery": ">=0.9.9",
41-
"phpunit/phpunit": "~4.8|~6.0"
40+
"phpunit/phpunit": "^8.5|^9.4",
41+
"yoast/phpunit-polyfills": "^0.2.0"
4242
},
4343
"autoload": {
4444
"psr-4": {
@@ -64,6 +64,12 @@
6464
]
6565
}
6666
},
67+
"funding": [
68+
{
69+
"type": "patreon",
70+
"url": "https://www.patreon.com/seantymon"
71+
}
72+
],
6773
"config": {
6874
"sort-packages": true
6975
},

docs/lumen-installation.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,19 @@ composer require tymon/jwt-auth
88

99
-------------------------------------------------------------------------------
1010

11-
### Bootstrap file changes.
11+
### Copy the config
12+
13+
Copy the `config` file from `vendor/tymon/jwt-auth/config/config.php` to `config` folder of your Lumen application and rename it to `jwt.php`
14+
15+
Register your config by adding the following in the `bootstrap/app.php` before middleware declaration.
16+
17+
```php
18+
$app->configure('jwt');
19+
```
20+
21+
-------------------------------------------------------------------------------
22+
23+
### Bootstrap file changes
1224

1325
Add the following snippet to the `bootstrap/app.php` file under the providers section as follows:
1426

0 commit comments

Comments
 (0)