@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class ModulusParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64UIntValue; |
|
| 16 | + use Base64UIntValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $n Modulus in base64urlUInt encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $n) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($n); |
|
| 26 | - parent::__construct(self::PARAM_MODULUS, $n); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $n Modulus in base64urlUInt encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $n) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($n); |
|
| 26 | + parent::__construct(self::PARAM_MODULUS, $n); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -13,15 +13,15 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class X509URLParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use StringParameterValue; |
|
| 16 | + use StringParameterValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $uri |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $uri) |
|
| 24 | - { |
|
| 25 | - parent::__construct(self::PARAM_X509_URL, $uri); |
|
| 26 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $uri |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $uri) |
|
| 24 | + { |
|
| 25 | + parent::__construct(self::PARAM_X509_URL, $uri); |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -13,30 +13,30 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class KeyTypeParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use StringParameterValue; |
|
| 16 | + use StringParameterValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Octet sequence key type. |
|
| 20 | - */ |
|
| 21 | - const TYPE_OCT = "oct"; |
|
| 18 | + /** |
|
| 19 | + * Octet sequence key type. |
|
| 20 | + */ |
|
| 21 | + const TYPE_OCT = "oct"; |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * RSA key type. |
|
| 25 | - */ |
|
| 26 | - const TYPE_RSA = "RSA"; |
|
| 23 | + /** |
|
| 24 | + * RSA key type. |
|
| 25 | + */ |
|
| 26 | + const TYPE_RSA = "RSA"; |
|
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * Elliptic curve key type. |
|
| 30 | - */ |
|
| 31 | - const TYPE_EC = "EC"; |
|
| 28 | + /** |
|
| 29 | + * Elliptic curve key type. |
|
| 30 | + */ |
|
| 31 | + const TYPE_EC = "EC"; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Constructor. |
|
| 35 | - * |
|
| 36 | - * @param string $type Key type |
|
| 37 | - */ |
|
| 38 | - public function __construct(string $type) |
|
| 39 | - { |
|
| 40 | - parent::__construct(self::PARAM_KEY_TYPE, $type); |
|
| 41 | - } |
|
| 33 | + /** |
|
| 34 | + * Constructor. |
|
| 35 | + * |
|
| 36 | + * @param string $type Key type |
|
| 37 | + */ |
|
| 38 | + public function __construct(string $type) |
|
| 39 | + { |
|
| 40 | + parent::__construct(self::PARAM_KEY_TYPE, $type); |
|
| 41 | + } |
|
| 42 | 42 | } |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class SecondPrimeFactorParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64UIntValue; |
|
| 16 | + use Base64UIntValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $q Second prime factor in base64urlUInt encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $q) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($q); |
|
| 26 | - parent::__construct(self::PARAM_SECOND_PRIME_FACTOR, $q); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $q Second prime factor in base64urlUInt encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $q) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($q); |
|
| 26 | + parent::__construct(self::PARAM_SECOND_PRIME_FACTOR, $q); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -13,15 +13,15 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class KeyIDParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use StringParameterValue; |
|
| 16 | + use StringParameterValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $id Key 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 Key ID |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $id) |
|
| 24 | + { |
|
| 25 | + parent::__construct(self::PARAM_KEY_ID, $id); |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class FirstCRTCoefficientParameter extends JWKParameter |
| 15 | 15 | { |
| 16 | - use Base64UIntValue; |
|
| 16 | + use Base64UIntValue; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Constructor. |
|
| 20 | - * |
|
| 21 | - * @param string $qi First CRT coefficient in base64urlUInt encoding |
|
| 22 | - */ |
|
| 23 | - public function __construct(string $qi) |
|
| 24 | - { |
|
| 25 | - $this->_validateEncoding($qi); |
|
| 26 | - parent::__construct(self::PARAM_FIRST_CRT_COEFFICIENT, $qi); |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * Constructor. |
|
| 20 | + * |
|
| 21 | + * @param string $qi First CRT coefficient in base64urlUInt encoding |
|
| 22 | + */ |
|
| 23 | + public function __construct(string $qi) |
|
| 24 | + { |
|
| 25 | + $this->_validateEncoding($qi); |
|
| 26 | + parent::__construct(self::PARAM_FIRST_CRT_COEFFICIENT, $qi); |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -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 | } |