| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function getResponse() : Response\Authorization\Start { |
||
| 37 | |||
| 38 | Cache\OrderAuthorizationResponse::getInstance()->clear($this->_order); |
||
|
|
|||
| 39 | |||
| 40 | $payload = [ |
||
| 41 | 'keyAuthorization' => (new ChallengeAuthorizationKey($this->_account))->get($this->_challenge->token) |
||
| 42 | ]; |
||
| 43 | |||
| 44 | $kid = Utilities\RequestSigner::KID( |
||
| 45 | $payload, |
||
| 46 | Cache\AccountResponse::getInstance()->get($this->_account)->getLocation(), |
||
| 47 | $this->_challenge->url, |
||
| 48 | Cache\NewNonceResponse::getInstance()->get()->getNonce(), |
||
| 49 | $this->_account->getKeyDirectoryPath() |
||
| 50 | ); |
||
| 51 | |||
| 52 | $result = Connector\Connector::getInstance()->request( |
||
| 53 | Connector\Connector::METHOD_POST, |
||
| 54 | $this->_challenge->url, |
||
| 55 | $kid |
||
| 56 | ); |
||
| 57 | |||
| 58 | return new Response\Authorization\Start($result); |
||
| 59 | } |
||
| 60 | } |