Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ShowappSoftware authored Jan 22, 2025
2 parents f1ba750 + 014be8d commit 694d3a9
Show file tree
Hide file tree
Showing 55 changed files with 392 additions and 392 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0]
laravel: [6.*, 7.*, 8.*]
php: [7.4, 8.0, 8.1]
laravel: [6.*, 7.*, 8.*, 9.*]
os: [ubuntu-latest]
coverage: [none]
include:
- php: 8.0
laravel: 8.*
- php: 8.1
laravel: 9.*
os: ubuntu-latest
coverage: xdebug
exclude:
- php: 7.2
laravel: 8.*
- php: 7.4
laravel: 9.*

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

Expand Down
3 changes: 0 additions & 3 deletions .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ preset: laravel

enabled:
- no_useless_else
- phpdoc_order
- phpdoc_separation
- unalign_double_arrow
# - length_ordered_imports
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![jwt-auth-banner](https://cloud.githubusercontent.com/assets/1801923/9915273/119b9350-5cae-11e5-850b-c941cac60b32.png)

[![PHPUnit](https://github.com/tymondesigns/jwt-auth/workflows/PHPUnit%20tests/badge.svg)](https://travis-ci.org/tymondesigns/jwt-auth)
[![PHPUnit](https://github.com/tymondesigns/jwt-auth/workflows/PHPUnit%20tests/badge.svg)](https://github.com/tymondesigns/jwt-auth/actions)
[![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&logo=composer)](https://packagist.org/packages/tymon/jwt-auth)
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
}
],
"require": {
"php": "^7.2|^8.0",
"php": "^7.4|^8.0|^8.1|^8.2",
"illuminate/auth": "^5.2|^6|^7|^8|^9",
"illuminate/contracts": "^5.2|^6|^7|^8|^9",
"illuminate/http": "^5.2|^6|^7|^8|^9",
"lcobucci/jwt": "<3.4",
"illuminate/support": "^5.2|^6|^7|^8|^9",
"lcobucci/jwt": "^3.4|^4.0",
"namshi/jose": "^7.0",
"nesbot/carbon": "^1.0|^2.0"
},
Expand Down
5 changes: 1 addition & 4 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,9 @@
|
| Specify the hashing algorithm that will be used to sign the token.
|
| See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL
| for possible values.
|
*/

'algo' => env('JWT_ALGO', 'HS256'),
'algo' => env('JWT_ALGO', Tymon\JWTAuth\Providers\JWT\Provider::ALGO_HS256),

/*
|--------------------------------------------------------------------------
Expand Down
10 changes: 0 additions & 10 deletions src/Blacklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class Blacklist
* Constructor.
*
* @param \Tymon\JWTAuth\Contracts\Providers\Storage $storage
*
* @return void
*/
public function __construct(Storage $storage)
Expand All @@ -60,7 +59,6 @@ public function __construct(Storage $storage)
* Add the token (jti claim) to the blacklist.
*
* @param \Tymon\JWTAuth\Payload $payload
*
* @return bool
*/
public function add(Payload $payload)
Expand Down Expand Up @@ -89,7 +87,6 @@ public function add(Payload $payload)
* Get the number of minutes until the token expiry.
*
* @param \Tymon\JWTAuth\Payload $payload
*
* @return int
*/
protected function getMinutesUntilExpired(Payload $payload)
Expand All @@ -107,7 +104,6 @@ protected function getMinutesUntilExpired(Payload $payload)
* Add the token (jti claim) to the blacklist indefinitely.
*
* @param \Tymon\JWTAuth\Payload $payload
*
* @return bool
*/
public function addForever(Payload $payload)
Expand All @@ -121,7 +117,6 @@ public function addForever(Payload $payload)
* Determine whether the token has been blacklisted.
*
* @param \Tymon\JWTAuth\Payload $payload
*
* @return bool
*/
public function has(Payload $payload)
Expand All @@ -141,7 +136,6 @@ public function has(Payload $payload)
* Remove the token (jti claim) from the blacklist.
*
* @param \Tymon\JWTAuth\Payload $payload
*
* @return bool
*/
public function remove(Payload $payload)
Expand Down Expand Up @@ -176,7 +170,6 @@ protected function getGraceTimestamp()
* Set the grace period.
*
* @param int $gracePeriod
*
* @return $this
*/
public function setGracePeriod($gracePeriod)
Expand All @@ -200,7 +193,6 @@ public function getGracePeriod()
* Get the unique key held within the blacklist.
*
* @param \Tymon\JWTAuth\Payload $payload
*
* @return mixed
*/
public function getKey(Payload $payload)
Expand All @@ -212,7 +204,6 @@ public function getKey(Payload $payload)
* Set the unique key held within the blacklist.
*
* @param string $key
*
* @return $this
*/
public function setKey($key)
Expand All @@ -226,7 +217,6 @@ public function setKey($key)
* Set the refresh time limit.
*
* @param int $ttl
*
* @return $this
*/
public function setRefreshTTL($ttl)
Expand Down
10 changes: 2 additions & 8 deletions src/Claims/Claim.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ abstract class Claim implements Arrayable, ClaimContract, Jsonable, JsonSerializ

/**
* @param mixed $value
*
* @return void
*/
public function __construct($value)
Expand All @@ -46,10 +45,9 @@ public function __construct($value)
* Set the claim value, and call a validate method.
*
* @param mixed $value
* @return $this
*
* @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException
*
* @return $this
*/
public function setValue($value)
{
Expand All @@ -72,7 +70,6 @@ public function getValue()
* Set the claim name.
*
* @param string $name
*
* @return $this
*/
public function setName($name)
Expand All @@ -96,7 +93,6 @@ public function getName()
* Validate the claim in a standalone Claim context.
*
* @param mixed $value
*
* @return bool
*/
public function validateCreate($value)
Expand All @@ -118,7 +114,6 @@ public function validatePayload()
* Validate the Claim within a refresh context.
*
* @param int $refreshTTL
*
* @return bool
*/
public function validateRefresh($refreshTTL)
Expand All @@ -131,7 +126,6 @@ public function validateRefresh($refreshTTL)
*
* @param mixed $value
* @param bool $strict
*
* @return bool
*/
public function matches($value, $strict = true)
Expand All @@ -144,6 +138,7 @@ public function matches($value, $strict = true)
*
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
Expand All @@ -163,7 +158,6 @@ public function toArray()
* Get the claim as JSON.
*
* @param int $options
*
* @return string
*/
public function toJson($options = JSON_UNESCAPED_SLASHES)
Expand Down
5 changes: 0 additions & 5 deletions src/Claims/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class Collection extends IlluminateCollection
* Create a new collection.
*
* @param mixed $items
*
* @return void
*/
public function __construct($items = [])
Expand All @@ -34,7 +33,6 @@ public function __construct($items = [])
* @param string $name
* @param callable $callback
* @param mixed $default
*
* @return \Tymon\JWTAuth\Claims\Claim
*/
public function getByClaimName($name, callable $callback = null, $default = null)
Expand All @@ -48,7 +46,6 @@ public function getByClaimName($name, callable $callback = null, $default = null
* Validate each claim under a given context.
*
* @param string $context
*
* @return $this
*/
public function validate($context = 'payload')
Expand All @@ -70,7 +67,6 @@ public function validate($context = 'payload')
* Determine if the Collection contains all of the given keys.
*
* @param mixed $claims
*
* @return bool
*/
public function hasAllClaims($claims)
Expand Down Expand Up @@ -102,7 +98,6 @@ protected function getArrayableItems($items)
* Ensure that the given claims array is keyed by the claim name.
*
* @param mixed $items
*
* @return array
*/
private function sanitizeClaims($items)
Expand Down
1 change: 0 additions & 1 deletion src/Claims/Custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class Custom extends Claim
/**
* @param string $name
* @param mixed $value
*
* @return void
*/
public function __construct($name, $value)
Expand Down
6 changes: 1 addition & 5 deletions src/Claims/DatetimeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ trait DatetimeTrait
* Set the claim value, and call a validate method.
*
* @param mixed $value
* @return $this
*
* @throws \Tymon\JWTAuth\Exceptions\InvalidClaimException
*
* @return $this
*/
public function setValue($value)
{
Expand Down Expand Up @@ -63,7 +62,6 @@ public function validateCreate($value)
* Determine whether the value is in the future.
*
* @param mixed $value
*
* @return bool
*/
protected function isFuture($value)
Expand All @@ -75,7 +73,6 @@ protected function isFuture($value)
* Determine whether the value is in the past.
*
* @param mixed $value
*
* @return bool
*/
protected function isPast($value)
Expand All @@ -87,7 +84,6 @@ protected function isPast($value)
* Set the leeway in seconds.
*
* @param int $leeway
*
* @return $this
*/
public function setLeeway($leeway)
Expand Down
8 changes: 0 additions & 8 deletions src/Claims/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class Factory
* Constructor.
*
* @param \Illuminate\Http\Request $request
*
* @return void
*/
public function __construct(Request $request)
Expand All @@ -70,7 +69,6 @@ public function __construct(Request $request)
*
* @param string $name
* @param mixed $value
*
* @return \Tymon\JWTAuth\Claims\Claim
*/
public function get($name, $value)
Expand All @@ -90,7 +88,6 @@ public function get($name, $value)
* Check whether the claim exists.
*
* @param string $name
*
* @return bool
*/
public function has($name)
Expand All @@ -102,7 +99,6 @@ public function has($name)
* Generate the initial value and return the Claim instance.
*
* @param string $name
*
* @return \Tymon\JWTAuth\Claims\Claim
*/
public function make($name)
Expand Down Expand Up @@ -165,7 +161,6 @@ public function jti()
*
* @param string $name
* @param string $classPath
*
* @return $this
*/
public function extend($name, $classPath)
Expand All @@ -179,7 +174,6 @@ public function extend($name, $classPath)
* Set the request instance.
*
* @param \Illuminate\Http\Request $request
*
* @return $this
*/
public function setRequest(Request $request)
Expand All @@ -193,7 +187,6 @@ public function setRequest(Request $request)
* Set the token ttl (in minutes).
*
* @param int $ttl
*
* @return $this
*/
public function setTTL($ttl)
Expand All @@ -217,7 +210,6 @@ public function getTTL()
* Set the leeway in seconds.
*
* @param int $leeway
*
* @return $this
*/
public function setLeeway($leeway)
Expand Down
1 change: 0 additions & 1 deletion src/Console/JWTGenerateSecretCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public function handle()
* Display the key.
*
* @param string $key
*
* @return void
*/
protected function displayKey($key)
Expand Down
Loading

0 comments on commit 694d3a9

Please sign in to comment.