| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function sign(JWK $jwk): string |
||
| 26 | { |
||
| 27 | $builder = new JoseBuilder(new AlgorithmManager($this->algorithms)); |
||
| 28 | $jws = $builder |
||
| 29 | ->create() |
||
| 30 | ->withPayload(JsonConverter::encode($this->jwt->claims->all())) |
||
| 31 | ->addSignature($jwk, $this->jwt->header->all()) |
||
| 32 | ->build() |
||
| 33 | ; |
||
| 34 | |||
| 35 | return (new CompactSerializer())->serialize($jws); |
||
| 36 | } |
||
| 37 | |||
| 57 |