[RFR]: Added Origin CA Certificate endpoint (#123)
* Added Certificate endpoint * Implement all calls in /certificates endpoint * Added to travis more php versions * Fix package compatibility * Added CertificateTest * Added test for Certificate endpoint * Added more tests * Updated README Co-authored-by: haphan <thanhha.phan@myrepublic.net>
This commit is contained in:
17
tests/Fixtures/Endpoints/createCertificate.json
Normal file
17
tests/Fixtures/Endpoints/createCertificate.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"success": true,
|
||||
"errors": [],
|
||||
"messages": [],
|
||||
"result": {
|
||||
"id": "12341234123412341234",
|
||||
"certificate": "some-cert-data-foofoo",
|
||||
"hostnames": [
|
||||
"foo.example.com",
|
||||
"bar.example.com"
|
||||
],
|
||||
"expires_on": "2014-01-01T05:20:00.12345Z",
|
||||
"request_type": "origin-ecc",
|
||||
"requested_validity": 365,
|
||||
"csr": "some-csr-data-barbar"
|
||||
}
|
||||
}
|
||||
17
tests/Fixtures/Endpoints/getCertificate.json
Normal file
17
tests/Fixtures/Endpoints/getCertificate.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"success": true,
|
||||
"errors": [],
|
||||
"messages": [],
|
||||
"result": {
|
||||
"id": "6666699999996666699999999966666666",
|
||||
"certificate": "some-cert-data-foobar",
|
||||
"hostnames": [
|
||||
"foo.example.com",
|
||||
"bar.example.com"
|
||||
],
|
||||
"expires_on": "2014-01-01T05:20:00.12345Z",
|
||||
"request_type": "origin-ecc",
|
||||
"requested_validity": 5475,
|
||||
"csr": "some-csr-data-foobar"
|
||||
}
|
||||
}
|
||||
19
tests/Fixtures/Endpoints/listCertificates.json
Normal file
19
tests/Fixtures/Endpoints/listCertificates.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"success": true,
|
||||
"errors": [],
|
||||
"messages": [],
|
||||
"result": [
|
||||
{
|
||||
"id": "328578533902268680212849205732770752308931942346",
|
||||
"certificate": "some-cert-data",
|
||||
"hostnames": [
|
||||
"example.com",
|
||||
"*.example.com"
|
||||
],
|
||||
"expires_on": "2014-01-01T05:20:00.12345Z",
|
||||
"request_type": "origin-rsa",
|
||||
"requested_validity": 5475,
|
||||
"csr": "some-csr-data"
|
||||
}
|
||||
]
|
||||
}
|
||||
8
tests/Fixtures/Endpoints/revokeCertificate.json
Normal file
8
tests/Fixtures/Endpoints/revokeCertificate.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"success": true,
|
||||
"errors": [],
|
||||
"messages": [],
|
||||
"result": {
|
||||
"id": "11112222233333444455555"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user