@@ -39,6 +39,5 @@ |
||
| 39 | 39 | * @class JWTException |
| 40 | 40 | * @package Platine\Framework\Security\JWT\Exception |
| 41 | 41 | */ |
| 42 | -class JWTException extends Exception |
|
| 43 | -{ |
|
| 42 | +class JWTException extends Exception { |
|
| 44 | 43 | } |
@@ -37,6 +37,5 @@ |
||
| 37 | 37 | * @class InvalidAlgorithmException |
| 38 | 38 | * @package Platine\Framework\Security\JWT\Exception |
| 39 | 39 | */ |
| 40 | -class InvalidAlgorithmException extends JWTException |
|
| 41 | -{ |
|
| 40 | +class InvalidAlgorithmException extends JWTException { |
|
| 42 | 41 | } |
@@ -37,6 +37,5 @@ |
||
| 37 | 37 | * @class TokenExpiredException |
| 38 | 38 | * @package Platine\Framework\Security\JWT\Exception |
| 39 | 39 | */ |
| 40 | -class TokenExpiredException extends JWTException |
|
| 41 | -{ |
|
| 40 | +class TokenExpiredException extends JWTException { |
|
| 42 | 41 | } |
@@ -37,6 +37,5 @@ |
||
| 37 | 37 | * @class InvalidTokenException |
| 38 | 38 | * @package Platine\Framework\Security\JWT\Exception |
| 39 | 39 | */ |
| 40 | -class InvalidTokenException extends JWTException |
|
| 41 | -{ |
|
| 40 | +class InvalidTokenException extends JWTException { |
|
| 42 | 41 | } |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class Base64UrlSafeEncoder |
| 54 | 54 | * @package Platine\Framework\Security\JWT\Encoder |
| 55 | 55 | */ |
| 56 | -class Base64UrlSafeEncoder implements EncoderInterface |
|
| 57 | -{ |
|
| 56 | +class Base64UrlSafeEncoder implements EncoderInterface { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * {@inheritdoc} |
@@ -56,8 +56,7 @@ discard block |
||
| 56 | 56 | * @package Platine\Framework\Security\JWT\Signer |
| 57 | 57 | * @template T |
| 58 | 58 | */ |
| 59 | -class HMAC implements SignerInterface |
|
| 60 | -{ |
|
| 59 | +class HMAC implements SignerInterface { |
|
| 61 | 60 | |
| 62 | 61 | /** |
| 63 | 62 | * The configuration instance |
@@ -75,8 +74,7 @@ discard block |
||
| 75 | 74 | * Create new instance |
| 76 | 75 | * @param Config<T> $config |
| 77 | 76 | */ |
| 78 | - public function __construct(Config $config) |
|
| 79 | - { |
|
| 77 | + public function __construct(Config $config) { |
|
| 80 | 78 | $this->config = $config; |
| 81 | 79 | $algo = $config->get('api.sign.hmac.signature_algo', ''); |
| 82 | 80 | if (!in_array($algo, hash_hmac_algos())) { |
@@ -148,8 +148,8 @@ |
||
| 148 | 148 | )); |
| 149 | 149 | } else { |
| 150 | 150 | $this->setHeaders($headers) |
| 151 | - ->setPayload($payload) |
|
| 152 | - ->setOriginalToken($token) |
|
| 151 | + ->setPayload($payload) |
|
| 152 | + ->setOriginalToken($token) |
|
| 153 | 153 | ->setEncodedSignature($parts[2]); |
| 154 | 154 | |
| 155 | 155 | if (!$this->verify()) { |
@@ -57,8 +57,7 @@ |
||
| 57 | 57 | * @class JWT |
| 58 | 58 | * @package Platine\Framework\Security\JWT |
| 59 | 59 | */ |
| 60 | -class JWT |
|
| 61 | -{ |
|
| 60 | +class JWT { |
|
| 62 | 61 | |
| 63 | 62 | /** |
| 64 | 63 | * The payload |
@@ -51,8 +51,7 @@ |
||
| 51 | 51 | * @class EncoderInterface |
| 52 | 52 | * @package Platine\Framework\Security\JWT |
| 53 | 53 | */ |
| 54 | -interface EncoderInterface |
|
| 55 | -{ |
|
| 54 | +interface EncoderInterface { |
|
| 56 | 55 | |
| 57 | 56 | /** |
| 58 | 57 | * Encode the given data |
@@ -61,8 +61,7 @@ |
||
| 61 | 61 | * @package Platine\Framework\Auth\Middleware |
| 62 | 62 | * @template T |
| 63 | 63 | */ |
| 64 | -class ApiAuthenticationMiddleware implements MiddlewareInterface |
|
| 65 | -{ |
|
| 64 | +class ApiAuthenticationMiddleware implements MiddlewareInterface { |
|
| 66 | 65 | |
| 67 | 66 | /** |
| 68 | 67 | * The Authentication instance |