@@ -13,26 +13,26 @@ |
||
13 | 13 | */ |
14 | 14 | class InitializationVectorParameter extends JWTParameter |
15 | 15 | { |
16 | - use Base64URLValue; |
|
16 | + use Base64URLValue; |
|
17 | 17 | |
18 | - /** |
|
19 | - * Constructor. |
|
20 | - * |
|
21 | - * @param string $iv Base64url encoded initialization vector |
|
22 | - */ |
|
23 | - public function __construct(string $iv) |
|
24 | - { |
|
25 | - $this->_validateEncoding($iv); |
|
26 | - parent::__construct(self::PARAM_INITIALIZATION_VECTOR, $iv); |
|
27 | - } |
|
18 | + /** |
|
19 | + * Constructor. |
|
20 | + * |
|
21 | + * @param string $iv Base64url encoded initialization vector |
|
22 | + */ |
|
23 | + public function __construct(string $iv) |
|
24 | + { |
|
25 | + $this->_validateEncoding($iv); |
|
26 | + parent::__construct(self::PARAM_INITIALIZATION_VECTOR, $iv); |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * Get the initialization vector. |
|
31 | - * |
|
32 | - * @return string |
|
33 | - */ |
|
34 | - public function initializationVector(): string |
|
35 | - { |
|
36 | - return $this->string(); |
|
37 | - } |
|
29 | + /** |
|
30 | + * Get the initialization vector. |
|
31 | + * |
|
32 | + * @return string |
|
33 | + */ |
|
34 | + public function initializationVector(): string |
|
35 | + { |
|
36 | + return $this->string(); |
|
37 | + } |
|
38 | 38 | } |
@@ -13,15 +13,15 @@ |
||
13 | 13 | */ |
14 | 14 | class KeyIDParameter extends JWTParameter |
15 | 15 | { |
16 | - use StringParameterValue; |
|
16 | + use StringParameterValue; |
|
17 | 17 | |
18 | - /** |
|
19 | - * Constructor. |
|
20 | - * |
|
21 | - * @param string $id |
|
22 | - */ |
|
23 | - public function __construct(string $id) |
|
24 | - { |
|
25 | - parent::__construct(self::PARAM_KEY_ID, $id); |
|
26 | - } |
|
18 | + /** |
|
19 | + * Constructor. |
|
20 | + * |
|
21 | + * @param string $id |
|
22 | + */ |
|
23 | + public function __construct(string $id) |
|
24 | + { |
|
25 | + parent::__construct(self::PARAM_KEY_ID, $id); |
|
26 | + } |
|
27 | 27 | } |
@@ -11,24 +11,24 @@ |
||
11 | 11 | */ |
12 | 12 | class PBES2CountParameter extends JWTParameter |
13 | 13 | { |
14 | - /** |
|
15 | - * Constructor. |
|
16 | - * |
|
17 | - * @param int $count |
|
18 | - */ |
|
19 | - public function __construct(int $count) |
|
20 | - { |
|
21 | - parent::__construct(self::PARAM_PBES2_COUNT, $count); |
|
22 | - } |
|
14 | + /** |
|
15 | + * Constructor. |
|
16 | + * |
|
17 | + * @param int $count |
|
18 | + */ |
|
19 | + public function __construct(int $count) |
|
20 | + { |
|
21 | + parent::__construct(self::PARAM_PBES2_COUNT, $count); |
|
22 | + } |
|
23 | 23 | |
24 | - /** |
|
25 | - * Initialize from a JSON value. |
|
26 | - * |
|
27 | - * @param int $value |
|
28 | - * @return self |
|
29 | - */ |
|
30 | - public static function fromJSONValue($value): self |
|
31 | - { |
|
32 | - return new self(intval($value)); |
|
33 | - } |
|
24 | + /** |
|
25 | + * Initialize from a JSON value. |
|
26 | + * |
|
27 | + * @param int $value |
|
28 | + * @return self |
|
29 | + */ |
|
30 | + public static function fromJSONValue($value): self |
|
31 | + { |
|
32 | + return new self(intval($value)); |
|
33 | + } |
|
34 | 34 | } |
@@ -9,10 +9,10 @@ |
||
9 | 9 | */ |
10 | 10 | interface CompressionAlgorithmParameterValue |
11 | 11 | { |
12 | - /** |
|
13 | - * Get compression algorithm type as an 'zip' parameter value. |
|
14 | - * |
|
15 | - * @return string |
|
16 | - */ |
|
17 | - public function compressionParamValue(): string; |
|
12 | + /** |
|
13 | + * Get compression algorithm type as an 'zip' parameter value. |
|
14 | + * |
|
15 | + * @return string |
|
16 | + */ |
|
17 | + public function compressionParamValue(): string; |
|
18 | 18 | } |
@@ -13,17 +13,17 @@ |
||
13 | 13 | */ |
14 | 14 | class X509CertificateSHA1ThumbprintParameter extends JWTParameter |
15 | 15 | { |
16 | - use Base64URLValue; |
|
16 | + use Base64URLValue; |
|
17 | 17 | |
18 | - /** |
|
19 | - * Constructor. |
|
20 | - * |
|
21 | - * @param string $thumbprint Base64url encoded SHA-1 hash |
|
22 | - */ |
|
23 | - public function __construct(string $thumbprint) |
|
24 | - { |
|
25 | - $this->_validateEncoding($thumbprint); |
|
26 | - parent::__construct(self::PARAM_X509_CERTIFICATE_SHA1_THUMBPRINT, |
|
27 | - $thumbprint); |
|
28 | - } |
|
18 | + /** |
|
19 | + * Constructor. |
|
20 | + * |
|
21 | + * @param string $thumbprint Base64url encoded SHA-1 hash |
|
22 | + */ |
|
23 | + public function __construct(string $thumbprint) |
|
24 | + { |
|
25 | + $this->_validateEncoding($thumbprint); |
|
26 | + parent::__construct(self::PARAM_X509_CERTIFICATE_SHA1_THUMBPRINT, |
|
27 | + $thumbprint); |
|
28 | + } |
|
29 | 29 | } |
@@ -9,10 +9,10 @@ |
||
9 | 9 | */ |
10 | 10 | interface AlgorithmParameterValue |
11 | 11 | { |
12 | - /** |
|
13 | - * Get algorithm type as an 'alg' parameter value. |
|
14 | - * |
|
15 | - * @return string |
|
16 | - */ |
|
17 | - public function algorithmParamValue(): string; |
|
12 | + /** |
|
13 | + * Get algorithm type as an 'alg' parameter value. |
|
14 | + * |
|
15 | + * @return string |
|
16 | + */ |
|
17 | + public function algorithmParamValue(): string; |
|
18 | 18 | } |
@@ -13,17 +13,17 @@ |
||
13 | 13 | */ |
14 | 14 | class X509CertificateSHA256ThumbprintParameter extends JWTParameter |
15 | 15 | { |
16 | - use Base64URLValue; |
|
16 | + use Base64URLValue; |
|
17 | 17 | |
18 | - /** |
|
19 | - * Constructor. |
|
20 | - * |
|
21 | - * @param string $thumbprint Base64url encoded SHA-256 hash |
|
22 | - */ |
|
23 | - public function __construct(string $thumbprint) |
|
24 | - { |
|
25 | - $this->_validateEncoding($thumbprint); |
|
26 | - parent::__construct(self::PARAM_X509_CERTIFICATE_SHA256_THUMBPRINT, |
|
27 | - $thumbprint); |
|
28 | - } |
|
18 | + /** |
|
19 | + * Constructor. |
|
20 | + * |
|
21 | + * @param string $thumbprint Base64url encoded SHA-256 hash |
|
22 | + */ |
|
23 | + public function __construct(string $thumbprint) |
|
24 | + { |
|
25 | + $this->_validateEncoding($thumbprint); |
|
26 | + parent::__construct(self::PARAM_X509_CERTIFICATE_SHA256_THUMBPRINT, |
|
27 | + $thumbprint); |
|
28 | + } |
|
29 | 29 | } |
@@ -13,27 +13,27 @@ |
||
13 | 13 | */ |
14 | 14 | class CompressionAlgorithmParameter extends JWTParameter |
15 | 15 | { |
16 | - use StringParameterValue; |
|
16 | + use StringParameterValue; |
|
17 | 17 | |
18 | - /** |
|
19 | - * Constructor. |
|
20 | - * |
|
21 | - * @param string $algo |
|
22 | - */ |
|
23 | - public function __construct(string $algo) |
|
24 | - { |
|
25 | - parent::__construct(self::PARAM_COMPRESSION_ALGORITHM, $algo); |
|
26 | - } |
|
18 | + /** |
|
19 | + * Constructor. |
|
20 | + * |
|
21 | + * @param string $algo |
|
22 | + */ |
|
23 | + public function __construct(string $algo) |
|
24 | + { |
|
25 | + parent::__construct(self::PARAM_COMPRESSION_ALGORITHM, $algo); |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * Initialize from CompressionAlgorithmParameterValue. |
|
30 | - * |
|
31 | - * @param CompressionAlgorithmParameterValue $value |
|
32 | - * @return self |
|
33 | - */ |
|
34 | - public static function fromAlgorithm( |
|
35 | - CompressionAlgorithmParameterValue $value): self |
|
36 | - { |
|
37 | - return new self($value->compressionParamValue()); |
|
38 | - } |
|
28 | + /** |
|
29 | + * Initialize from CompressionAlgorithmParameterValue. |
|
30 | + * |
|
31 | + * @param CompressionAlgorithmParameterValue $value |
|
32 | + * @return self |
|
33 | + */ |
|
34 | + public static function fromAlgorithm( |
|
35 | + CompressionAlgorithmParameterValue $value): self |
|
36 | + { |
|
37 | + return new self($value->compressionParamValue()); |
|
38 | + } |
|
39 | 39 | } |
@@ -14,26 +14,26 @@ |
||
14 | 14 | */ |
15 | 15 | class AlgorithmParameter extends JWTParameter |
16 | 16 | { |
17 | - use StringParameterValue; |
|
17 | + use StringParameterValue; |
|
18 | 18 | |
19 | - /** |
|
20 | - * Constructor. |
|
21 | - * |
|
22 | - * @param string $algo Algorithm name |
|
23 | - */ |
|
24 | - public function __construct(string $algo) |
|
25 | - { |
|
26 | - parent::__construct(self::PARAM_ALGORITHM, $algo); |
|
27 | - } |
|
19 | + /** |
|
20 | + * Constructor. |
|
21 | + * |
|
22 | + * @param string $algo Algorithm name |
|
23 | + */ |
|
24 | + public function __construct(string $algo) |
|
25 | + { |
|
26 | + parent::__construct(self::PARAM_ALGORITHM, $algo); |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * Initialize from AlgorithmParameterValue. |
|
31 | - * |
|
32 | - * @param AlgorithmParameterValue $value |
|
33 | - * @return self |
|
34 | - */ |
|
35 | - public static function fromAlgorithm(AlgorithmParameterValue $value): self |
|
36 | - { |
|
37 | - return new self($value->algorithmParamValue()); |
|
38 | - } |
|
29 | + /** |
|
30 | + * Initialize from AlgorithmParameterValue. |
|
31 | + * |
|
32 | + * @param AlgorithmParameterValue $value |
|
33 | + * @return self |
|
34 | + */ |
|
35 | + public static function fromAlgorithm(AlgorithmParameterValue $value): self |
|
36 | + { |
|
37 | + return new self($value->algorithmParamValue()); |
|
38 | + } |
|
39 | 39 | } |