@@ -11,13 +11,13 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | abstract class CoordinateParameter extends JWKParameter |
| 13 | 13 | { |
| 14 | - /** |
|
| 15 | - * Get coordinate in octet string representation. |
|
| 16 | - * |
|
| 17 | - * @return string |
|
| 18 | - */ |
|
| 19 | - public function coordinateOctets(): string |
|
| 20 | - { |
|
| 21 | - return Base64::urlDecode($this->_value); |
|
| 22 | - } |
|
| 14 | + /** |
|
| 15 | + * Get coordinate in octet string representation. |
|
| 16 | + * |
|
| 17 | + * @return string |
|
| 18 | + */ |
|
| 19 | + public function coordinateOctets(): string |
|
| 20 | + { |
|
| 21 | + return Base64::urlDecode($this->_value); |
|
| 22 | + } |
|
| 23 | 23 | } |
@@ -13,17 +13,17 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class X509CertificateSHA1ThumbprintParameter extends JWKParameter |
| 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 | } |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class FirstFactorCRTExponentParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64UIntValue; |
|
| 16 | + use Base64UIntValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $dp First factor CRT exponent in base64urlUInt encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $dp) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($dp); |
|
| 26 | - parent::__construct(self::PARAM_FIRST_FACTOR_CRT_EXPONENT, $dp); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $dp First factor CRT exponent in base64urlUInt encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $dp) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($dp); |
|
| 26 | + parent::__construct(self::PARAM_FIRST_FACTOR_CRT_EXPONENT, $dp); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |