Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mbretter committed Jun 4, 2018
1 parent 46756a4 commit 99a5fa8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,21 @@ Benefits:
* no dependencies like curl or other packages
* it comes up with a builtin httpclient, but any other PSR7 compliant http client may be used
* it uses standard classes, but you can use your own data objects

## setup new account

```php
use Karl\Acme2;
use Karl\Acme2\Resources;

$acme = new Acme2\Acme();

$key = new Acme2\Key\RSA();
$key->generate();
$pem = $key->getPem(); // store your key somewhere

$acme->setKey($key); // acme needs a key to operate

$account = new Resources\Account($acme);
$account->create(['termsOfServiceAgreed' => true, 'contact' => ['mailto:example@example.com']]);
```

0 comments on commit 99a5fa8

Please sign in to comment.