stonemax / acme2

Another PHP client for acme protocal (version 2) implementation, used for generating letsencrypt's free ssl certificates.
MIT License
48 stars 27 forks source link

Authorization deactivation #30

Open tkrynicki opened 5 years ago

tkrynicki commented 5 years ago

Hi

Is it possible to add Authorization deactivation feature? https://community.letsencrypt.org/t/authorization-deactivation/19860

tkrynicki commented 5 years ago
    /**
     * Deactivate an LetsEncrypt Authorization
     */
    public function deactivateOrder()
    {
        foreach ($this->_authorizationList as $authorization)
        {
            $jws = OpenSSLHelper::generateJWSOfKid(
                $authorization->authorizationUrl,
                Client::$runtime->account->getAccountUrl(),
                ['status' => 'deactivated']
            );

            list($code, $header, $body) = RequestHelper::post($authorization->authorizationUrl, $jws);

            if ($code != 200)
            {
                throw new OrderException('Deactivation failed'.", the code is: {$code}, the header is: {$header}, the body is: ".print_r($body, TRUE));
            }
            $this->removeLocalData();
            $this->populate($body);
        }
    }
stonemax commented 5 years ago

Can you describe your requirements in detail? I need to know why you need this feature.