1 | <?php |
||
20 | final class JWSFactory |
||
21 | { |
||
22 | /** |
||
23 | * @param mixed $payload |
||
24 | * |
||
25 | * @return \Jose\Object\JWSInterface |
||
26 | */ |
||
27 | public static function createEmptyJWS($payload) |
||
34 | |||
35 | /** |
||
36 | * @param mixed $payload |
||
37 | * @param string $encoded_payload |
||
38 | * |
||
39 | * @return \Jose\Object\JWSInterface |
||
40 | */ |
||
41 | public static function createEmptyJWSWithDetachedPayload($payload, &$encoded_payload) |
||
47 | |||
48 | /** |
||
49 | * @param mixed $payload |
||
50 | * @param \Jose\Object\JWKInterface $signature_key |
||
51 | * @param array $protected_headers |
||
52 | * @param \Psr\Log\LoggerInterface|null $logger |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | public static function createJWSToCompactJSON($payload, JWKInterface $signature_key, array $protected_headers, LoggerInterface $logger = null) |
||
62 | |||
63 | /** |
||
64 | * @param mixed $payload |
||
65 | * @param \Jose\Object\JWKInterface $signature_key |
||
66 | * @param array $protected_headers |
||
67 | * @param string $encoded_payload |
||
68 | * @param \Psr\Log\LoggerInterface|null $logger |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | public static function createJWSWithDetachedPayloadToCompactJSON($payload, JWKInterface $signature_key, &$encoded_payload, array $protected_headers, LoggerInterface $logger = null) |
||
78 | |||
79 | /** |
||
80 | * @param mixed $payload |
||
81 | * @param \Jose\Object\JWKInterface $signature_key |
||
82 | * @param array $protected_headers |
||
83 | * @param array $headers |
||
84 | * @param \Psr\Log\LoggerInterface|null $logger |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | public static function createJWSToFlattenedJSON($payload, JWKInterface $signature_key, array $protected_headers = [], $headers = [], LoggerInterface $logger = null) |
||
94 | |||
95 | /** |
||
96 | * @param mixed $payload |
||
97 | * @param \Jose\Object\JWKInterface $signature_key |
||
98 | * @param string $encoded_payload |
||
99 | * @param array $protected_headers |
||
100 | * @param array $headers |
||
101 | * @param \Psr\Log\LoggerInterface|null $logger |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | public static function createJWSWithDetachedPayloadToFlattenedJSON($payload, JWKInterface $signature_key, &$encoded_payload, array $protected_headers = [], $headers = [], LoggerInterface $logger = null) |
||
111 | |||
112 | /** |
||
113 | * @param mixed $payload |
||
114 | * @param \Jose\Object\JWKInterface $signature_key |
||
115 | * @param array $protected_headers |
||
116 | * @param \Psr\Log\LoggerInterface|null $logger |
||
117 | * |
||
118 | * @return \Jose\Object\JWSInterface |
||
119 | */ |
||
120 | private static function createJWSAndSign($payload, JWKInterface $signature_key, array $protected_headers = [], $headers = [], LoggerInterface $logger = null) |
||
132 | |||
133 | /** |
||
134 | * @param mixed $payload |
||
135 | * @param \Jose\Object\JWKInterface $signature_key |
||
136 | * @param array $protected_headers |
||
137 | * @param \Psr\Log\LoggerInterface|null $logger |
||
138 | * |
||
139 | * @return \Jose\Object\JWSInterface |
||
140 | */ |
||
141 | private static function createJWSWithDetachedPayloadAndSign($payload, JWKInterface $signature_key, &$encoded_payload, array $protected_headers = [], $headers = [], LoggerInterface $logger = null) |
||
153 | } |
||
154 |