Skip to content

Merge from upstream #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
69 changes: 69 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: PHPUnit tests

on:
push:
pull_request:
release:
types:
- published

jobs:
php-tests:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0]
laravel: [6.*, 7.*, 8.*]
os: [ubuntu-latest]
coverage: [none]
include:
- php: 8.0
laravel: 8.*
os: ubuntu-latest
coverage: xdebug
exclude:
- php: 7.2
laravel: 8.*

name: '[P${{ matrix.php }}] [L${{ matrix.laravel }}] [${{ matrix.coverage }}]'

steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring json openssl
coverage: ${{ matrix.coverage }}
ini-values: memory_limit=-1

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
restore-keys: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"

- name: Install dependencies
run: |
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-progress --no-update
composer update --no-progress --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: composer test:ci

- name: Upload coverage
uses: codecov/codecov-action@v1
if: matrix.coverage == 'xdebug'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
yml: ./codecov.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@
composer.lock
build
coverage.xml
.phpunit.result.cache
2 changes: 1 addition & 1 deletion .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
preset: laravel

enabled:
- is_null
- no_useless_else
- phpdoc_order
- phpdoc_separation
- unalign_double_arrow
# - length_ordered_imports
131 changes: 0 additions & 131 deletions .travis.yml

This file was deleted.

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

[![Build Status](http://img.shields.io/travis/tymondesigns/jwt-auth/master.svg?style=flat-square)](https://travis-ci.org/tymondesigns/jwt-auth)
[![Codecov branch](https://img.shields.io/codecov/c/github/tymondesigns/jwt-auth/develop.svg?style=flat-square)](https://codecov.io/github/tymondesigns/jwt-auth)
[![PHPUnit](https://github.com/tymondesigns/jwt-auth/workflows/PHPUnit%20tests/badge.svg)](https://travis-ci.org/tymondesigns/jwt-auth)
[![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)
[![StyleCI](https://styleci.io/repos/23680678/shield?style=flat-square)](https://styleci.io/repos/23680678)
[![Latest Version](http://img.shields.io/packagist/v/tymon/jwt-auth.svg?style=flat-square)](https://packagist.org/packages/tymon/jwt-auth)
[![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)
[![Monthly Downloads](https://img.shields.io/packagist/dm/tymon/jwt-auth.svg?style=flat-square)](https://packagist.org/packages/tymon/jwt-auth)
[![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)
[![PHP-Eye](https://php-eye.com/badge/tymon/jwt-auth/tested.svg?style=flat-square)](https://php-eye.com/package/tymon/jwt-auth)
[![Latest Version](http://img.shields.io/packagist/v/tymon/jwt-auth.svg?style=flat-square&logo=composer)](https://packagist.org/packages/tymon/jwt-auth)
[![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)
[![Monthly Downloads](https://img.shields.io/packagist/dm/tymon/jwt-auth.svg?style=flat-square&logo=composer)](https://packagist.org/packages/tymon/jwt-auth)

## Documentation

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

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

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

-----------------------------------

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

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)
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)

## Security

@@ -31,6 +29,4 @@ If you discover any security related issues, please email tymon148@gmail.com ins

The MIT License (MIT)

[![Beerpay](https://beerpay.io/tymondesigns/jwt-auth/badge.svg)](https://beerpay.io/tymondesigns/jwt-auth)

[![SensioLabs Insight](https://insight.sensiolabs.com/projects/ba600082-7869-4ea8-b877-0bf6a86d4988/small.png)](https://insight.sensiolabs.com/projects/ba600082-7869-4ea8-b877-0bf6a86d4988)
[![SensioLabs Insight](https://insight.sensiolabs.com/projects/ba600082-7869-4ea8-b877-0bf6a86d4988/big.svg)](https://insight.sensiolabs.com/projects/ba600082-7869-4ea8-b877-0bf6a86d4988)
28 changes: 17 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -23,22 +23,22 @@
}
],
"require": {
"php": "^5.5.9|^7.0",
"illuminate/auth": "^5.1|^6",
"illuminate/contracts": "^5.1|^6",
"illuminate/http": "^5.1|^6",
"illuminate/support": "^5.1|^6",
"lcobucci/jwt": "^3.2",
"php": "^7.2|^8.0",
"illuminate/auth": "^5.2|^6|^7|^8",
"illuminate/contracts": "^5.2|^6|^7|^8",
"illuminate/http": "^5.2|^6|^7|^8",
"illuminate/support": "^5.2|^6|^7|^8",
"lcobucci/jwt": "<3.4",
"namshi/jose": "^7.0",
"nesbot/carbon": "^1.0|^2.0"
},
"require-dev": {
"cartalyst/sentinel": "^2|^3",
"illuminate/console": "^5.1|^6",
"illuminate/database": "^5.1|^6",
"illuminate/routing": "^5.1|^6",
"illuminate/console": "^5.2|^6|^7|^8",
"illuminate/database": "^5.2|^6|^7|^8",
"illuminate/routing": "^5.2|^6|^7|^8",
"mockery/mockery": ">=0.9.9",
"phpunit/phpunit": "~4.8|~6.0"
"phpunit/phpunit": "^8.5|^9.4",
"yoast/phpunit-polyfills": "^0.2.0"
},
"autoload": {
"psr-4": {
@@ -64,6 +64,12 @@
]
}
},
"funding": [
{
"type": "patreon",
"url": "https://www.patreon.com/seantymon"
}
],
"config": {
"sort-packages": true
},
14 changes: 13 additions & 1 deletion docs/lumen-installation.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,19 @@ composer require tymon/jwt-auth

-------------------------------------------------------------------------------

### Bootstrap file changes.
### Copy the config

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`

Register your config by adding the following in the `bootstrap/app.php` before middleware declaration.

```php
$app->configure('jwt');
```

-------------------------------------------------------------------------------

### Bootstrap file changes

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

Loading