PHP 클래스 Kelunik\Acme\AcmeService

저자: Niklas Keller ([email protected])
파일 보기 프로젝트 열기: kelunik/acme 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( AcmeClient $acmeClient ) AcmeService constructor.
answerChallenge ( string $location, string $keyAuth ) : Amp\Promise Answers a challenge and signals that the CA should validate it.
pollForCertificate ( string $location ) : Amp\Promise Polls for a certificate.
pollForChallenge ( string $location ) : Amp\Promise Polls until a challenge has been validated.
register ( string $email, string | null $agreement = null ) : Amp\Promise Registers a new account on the server.
requestCertificate ( string $csr ) : Amp\Promise Requests a new certificate.
requestChallenges ( string $dns ) : Amp\Promise Requests challenges for a given DNS name.
revokeCertificate ( string $pem ) : Amp\Promise Revokes a certificate.

비공개 메소드들

메소드 설명
doAnswerChallenge ( string $location, string $keyAuth ) : Generator Answers a challenge and signals that the CA should validate it.
doPollForCertificate ( string $location ) : Generator Polls for a certificate.
doPollForChallenge ( string $location ) : Generator Polls until a challenge has been validated.
doRegister ( string $email, string | null $agreement = null ) : Generator Registers a new account on the server.
doRequestCertificate ( string $csr ) : Generator Requests a new certificate.
doRequestChallenges ( string $dns ) : Generator Requests challenges for a given DNS name.
doRevokeCertificate ( string $pem ) : Generator Revokes a certificate.
generateException ( Amp\Artax\Response $response ) : AcmeException Generates a new exception using the response to provide details.
parseRetryAfter ( string $header ) : integer Parses a retry header into seconds to wait until a request should be retried.

메소드 상세

__construct() 공개 메소드

AcmeService constructor.
public __construct ( AcmeClient $acmeClient )
$acmeClient AcmeClient ACME client

answerChallenge() 공개 메소드

Answers a challenge and signals that the CA should validate it.
public answerChallenge ( string $location, string $keyAuth ) : Amp\Promise
$location string URI of the challenge
$keyAuth string key authorization
리턴 Amp\Promise resolves to the decoded JSON response

pollForCertificate() 공개 메소드

Polls for a certificate.
public pollForCertificate ( string $location ) : Amp\Promise
$location string URI of the certificate
리턴 Amp\Promise resolves to the complete certificate chain as array of PEM encoded certificates

pollForChallenge() 공개 메소드

Polls until a challenge has been validated.
public pollForChallenge ( string $location ) : Amp\Promise
$location string URI of the challenge
리턴 Amp\Promise resolves to null

register() 공개 메소드

Registers a new account on the server.
public register ( string $email, string | null $agreement = null ) : Amp\Promise
$email string e-mail address for contact
$agreement string | null agreement URI or null if not agreed yet
리턴 Amp\Promise resolves to a Registration object

requestCertificate() 공개 메소드

Requests a new certificate.
public requestCertificate ( string $csr ) : Amp\Promise
$csr string certificate signing request
리턴 Amp\Promise resolves to the URI where the certificate will be provided

requestChallenges() 공개 메소드

Requests challenges for a given DNS name.
public requestChallenges ( string $dns ) : Amp\Promise
$dns string DNS name to request challenge for
리턴 Amp\Promise resolves to an array of challenges

revokeCertificate() 공개 메소드

Revokes a certificate.
public revokeCertificate ( string $pem ) : Amp\Promise
$pem string PEM encoded certificate
리턴 Amp\Promise resolves to true