1 | <?php |
||
29 | final class Loader implements LoaderInterface |
||
30 | { |
||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public static function loadAndDecryptUsingKey($input, JWKInterface $jwk, array $allowed_algorithms, LoggerInterface $logger = null) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public static function loadAndDecryptUsingKeySet($input, JWKSetInterface $jwk_set, array $allowed_algorithms, LoggerInterface $logger = null) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public static function loadAndVerifySignatureUsingKey($input, JWKInterface $jwk, array $allowed_algorithms, LoggerInterface $logger = null) |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public static function loadAndVerifySignatureUsingKeySet($input, JWKSetInterface $jwk_set, array $allowed_algorithms, LoggerInterface $logger = null) |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public static function loadAndVerifySignatureUsingKeyAndDetachedPayload($input, JWKInterface $jwk, array $allowed_algorithms, $detached_payload, LoggerInterface $logger = null) |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public static function loadAndVerifySignatureUsingKeySetAndDetachedPayload($input, JWKSetInterface $jwk_set, array $allowed_algorithms, $detached_payload, LoggerInterface $logger = null) |
||
87 | |||
88 | /** |
||
89 | * @param string $input |
||
90 | * @param \Jose\Object\JWKSetInterface $jwk_set |
||
91 | * @param array $allowed_algorithms |
||
92 | * @param \Psr\Log\LoggerInterface|null $logger |
||
93 | * |
||
94 | * @return \Jose\Object\JWEInterface |
||
95 | */ |
||
96 | private static function loadAndDecrypt($input, JWKSetInterface $jwk_set, array $allowed_algorithms, LoggerInterface $logger = null) |
||
106 | |||
107 | /** |
||
108 | * @param string $input |
||
109 | * @param \Jose\Object\JWKSetInterface $jwk_set |
||
110 | * @param array $allowed_algorithms |
||
111 | * @param string|null $detached_payload |
||
112 | * @param \Psr\Log\LoggerInterface|null $logger |
||
113 | * |
||
114 | * @return \Jose\Object\JWSInterface |
||
115 | */ |
||
116 | private static function loadAndVerifySignature($input, JWKSetInterface $jwk_set, array $allowed_algorithms, $detached_payload = null, LoggerInterface $logger = null) |
||
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | public static function load($input) |
||
140 | |||
141 | /** |
||
142 | * @param string $input |
||
143 | * |
||
144 | * @return array |
||
145 | */ |
||
146 | private static function convert($input) |
||
161 | |||
162 | /** |
||
163 | * @param $input |
||
164 | * |
||
165 | * @return array |
||
166 | */ |
||
167 | private static function fromFlattenedSerializationRecipientToSerialization($input) |
||
187 | |||
188 | /** |
||
189 | * @param $input |
||
190 | * |
||
191 | * @return array |
||
192 | */ |
||
193 | private static function fromFlattenedSerializationSignatureToSerialization($input) |
||
212 | |||
213 | /** |
||
214 | * @param string $input |
||
215 | * |
||
216 | * @return array |
||
217 | */ |
||
218 | private static function fromCompactSerializationToSerialization($input) |
||
230 | |||
231 | /** |
||
232 | * @param array $parts |
||
233 | * |
||
234 | * @return array |
||
235 | */ |
||
236 | private static function fromCompactSerializationRecipientToSerialization(array $parts) |
||
254 | |||
255 | /** |
||
256 | * @param array $parts |
||
257 | * |
||
258 | * @return array |
||
259 | */ |
||
260 | private static function fromCompactSerializationSignatureToSerialization(array $parts) |
||
274 | } |
||
275 |