@@ -13,17 +13,17 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class X509CertificateSHA256ThumbprintParameter extends JWKParameter |
| 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 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |
@@ -13,15 +13,15 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class AlgorithmParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use StringParameterValue; |
|
| 16 | + use StringParameterValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $algo Algorithm name |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $algo) |
|
| 24 | - { |
|
| 25 | - parent::__construct(self::PARAM_ALGORITHM, $algo); |
|
| 26 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $algo Algorithm name |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $algo) |
|
| 24 | + { |
|
| 25 | + parent::__construct(self::PARAM_ALGORITHM, $algo); |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class FirstPrimeFactorParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64UIntValue; |
|
| 16 | + use Base64UIntValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $p First prime factor in base64urlUInt encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $p) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($p); |
|
| 26 | - parent::__construct(self::PARAM_FIRST_PRIME_FACTOR, $p); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $p First prime factor in base64urlUInt encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $p) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($p); |
|
| 26 | + parent::__construct(self::PARAM_FIRST_PRIME_FACTOR, $p); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class SecondFactorCRTExponentParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64UIntValue; |
|
| 16 | + use Base64UIntValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $dq Second factor CRT exponent in base64urlUInt encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $dq) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($dq); |
|
| 26 | - parent::__construct(self::PARAM_SECOND_FACTOR_CRT_EXPONENT, $dq); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $dq Second factor CRT exponent in base64urlUInt encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $dq) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($dq); |
|
| 26 | + parent::__construct(self::PARAM_SECOND_FACTOR_CRT_EXPONENT, $dq); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class PrivateExponentParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64UIntValue; |
|
| 16 | + use Base64UIntValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $d Private exponent in base64urlUInt encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $d) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($d); |
|
| 26 | - parent::__construct(self::PARAM_PRIVATE_EXPONENT, $d); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $d Private exponent in base64urlUInt encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $d) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($d); |
|
| 26 | + parent::__construct(self::PARAM_PRIVATE_EXPONENT, $d); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |
@@ -13,26 +13,26 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class KeyValueParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64URLValue; |
|
| 16 | + use Base64URLValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $key Base64url encoded key |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $key) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($key); |
|
| 26 | - parent::__construct(self::PARAM_KEY_VALUE, $key); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $key Base64url encoded key |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $key) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($key); |
|
| 26 | + parent::__construct(self::PARAM_KEY_VALUE, $key); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Get key in binary format. |
|
| 31 | - * |
|
| 32 | - * @return string |
|
| 33 | - */ |
|
| 34 | - public function key(): string |
|
| 35 | - { |
|
| 36 | - return $this->string(); |
|
| 37 | - } |
|
| 29 | + /** |
|
| 30 | + * Get key in binary format. |
|
| 31 | + * |
|
| 32 | + * @return string |
|
| 33 | + */ |
|
| 34 | + public function key(): string |
|
| 35 | + { |
|
| 36 | + return $this->string(); |
|
| 37 | + } |
|
| 38 | 38 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class ExponentParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64UIntValue; |
|
| 16 | + use Base64UIntValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $e Exponent in base64urlUInt encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $e) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($e); |
|
| 26 | - parent::__construct(self::PARAM_EXPONENT, $e); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $e Exponent in base64urlUInt encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $e) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($e); |
|
| 26 | + parent::__construct(self::PARAM_EXPONENT, $e); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |
@@ -13,26 +13,26 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class ECCPrivateKeyParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64URLValue; |
|
| 16 | + use Base64URLValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $key Private key in base64url encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $key) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($key); |
|
| 26 | - parent::__construct(self::PARAM_ECC_PRIVATE_KEY, $key); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $key Private key in base64url encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $key) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($key); |
|
| 26 | + parent::__construct(self::PARAM_ECC_PRIVATE_KEY, $key); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Get the EC private key in octet string representation. |
|
| 31 | - * |
|
| 32 | - * @return string |
|
| 33 | - */ |
|
| 34 | - public function privateKeyOctets(): string |
|
| 35 | - { |
|
| 36 | - return $this->string(); |
|
| 37 | - } |
|
| 29 | + /** |
|
| 30 | + * Get the EC private key in octet string representation. |
|
| 31 | + * |
|
| 32 | + * @return string |
|
| 33 | + */ |
|
| 34 | + public function privateKeyOctets(): string |
|
| 35 | + { |
|
| 36 | + return $this->string(); |
|
| 37 | + } |
|
| 38 | 38 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class YCoordinateParameter extends CoordinateParameter |
| 15 | 15 | { |
| 16 | - use Base64URLValue; |
|
| 16 | + use Base64URLValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $coord Y coordinate in base64url encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $coord) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($coord); |
|
| 26 | - parent::__construct(self::PARAM_Y_COORDINATE, $coord); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $coord Y coordinate in base64url encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $coord) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($coord); |
|
| 26 | + parent::__construct(self::PARAM_Y_COORDINATE, $coord); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Sop\JWX\JWK\Parameter; |
| 6 | 6 | |