lib/JWX/JWT/Header/Header.php 1 location
|
@@ 55-61 (lines=7) @@
|
52 |
|
* @throws \UnexpectedValueException |
53 |
|
* @return self |
54 |
|
*/ |
55 |
|
public static function fromJSON($json) { |
56 |
|
$members = json_decode($json, true, 32, JSON_BIGINT_AS_STRING); |
57 |
|
if (!is_array($members)) { |
58 |
|
throw new \UnexpectedValueException("Invalid JSON."); |
59 |
|
} |
60 |
|
return self::fromArray($members); |
61 |
|
} |
62 |
|
|
63 |
|
/** |
64 |
|
* Get self with parameters added. |
lib/JWX/JWK/JWK.php 1 location
|
@@ 58-64 (lines=7) @@
|
55 |
|
* @throws \UnexpectedValueException |
56 |
|
* @return self |
57 |
|
*/ |
58 |
|
public static function fromJSON($json) { |
59 |
|
$members = json_decode($json, true, 32, JSON_BIGINT_AS_STRING); |
60 |
|
if (!is_array($members)) { |
61 |
|
throw new \UnexpectedValueException("Invalid JSON."); |
62 |
|
} |
63 |
|
return static::fromArray($members); |
64 |
|
} |
65 |
|
|
66 |
|
/** |
67 |
|
* Initialize from another JWK. |
lib/JWX/JWK/JWKSet.php 1 location
|
@@ 82-88 (lines=7) @@
|
79 |
|
* @throws \UnexpectedValueException |
80 |
|
* @return self |
81 |
|
*/ |
82 |
|
public static function fromJSON($json) { |
83 |
|
$members = json_decode($json, true, 32, JSON_BIGINT_AS_STRING); |
84 |
|
if (!is_array($members)) { |
85 |
|
throw new \UnexpectedValueException("Invalid JSON."); |
86 |
|
} |
87 |
|
return self::fromArray($members); |
88 |
|
} |
89 |
|
|
90 |
|
/** |
91 |
|
* Get self with keys added. |