lib/JWX/JWK/Parameter/JWKParameter.php 1 location
|
@@ 118-124 (lines=7) @@
|
| 115 |
|
* @param mixed $value Parameter value |
| 116 |
|
* @return self |
| 117 |
|
*/ |
| 118 |
|
public static function fromNameAndValue($name, $value) { |
| 119 |
|
if (array_key_exists($name, self::MAP_NAME_TO_CLASS)) { |
| 120 |
|
$cls = self::MAP_NAME_TO_CLASS[$name]; |
| 121 |
|
return $cls::fromJSONValue($value); |
| 122 |
|
} |
| 123 |
|
return new self($name, $value); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
/** |
| 127 |
|
* Initialize a concrete JWK parameter instance from a JSON value. |
lib/JWX/JWT/Claim/Claim.php 1 location
|
@@ 60-66 (lines=7) @@
|
| 57 |
|
* @param mixed $value Claim value |
| 58 |
|
* @return Claim |
| 59 |
|
*/ |
| 60 |
|
public static function fromNameAndValue($name, $value) { |
| 61 |
|
if (array_key_exists($name, RegisteredClaim::MAP_NAME_TO_CLASS)) { |
| 62 |
|
$cls = RegisteredClaim::MAP_NAME_TO_CLASS[$name]; |
| 63 |
|
return $cls::fromJSONValue($value); |
| 64 |
|
} |
| 65 |
|
return new self($name, $value); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
/** |
| 69 |
|
* Get the claim name. |
lib/JWX/JWT/Parameter/JWTParameter.php 1 location
|
@@ 113-119 (lines=7) @@
|
| 110 |
|
* @param mixed $value Parameter value |
| 111 |
|
* @return self |
| 112 |
|
*/ |
| 113 |
|
public static function fromNameAndValue($name, $value) { |
| 114 |
|
if (array_key_exists($name, self::MAP_NAME_TO_CLASS)) { |
| 115 |
|
$cls = self::MAP_NAME_TO_CLASS[$name]; |
| 116 |
|
return $cls::fromJSONValue($value); |
| 117 |
|
} |
| 118 |
|
return new self($name, $value); |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
/** |
| 122 |
|
* Initialize a concrete JWT parameter instance from a JSON value. |