You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ There are several good examples and tutorials on the web:
73
73
### Authentication
74
74
Browsers need to verify your identity. A standard called VAPID can authenticate you for all browsers. You'll need to create and provide a public and private key for your server.
75
75
76
-
You can specify your authentication details when instantiating WebPush:
76
+
You can specify your authentication details when instantiating WebPush. The keys can be passed directly, or you can load a PEM file or its content:
77
77
```php
78
78
<?php
79
79
@@ -87,14 +87,16 @@ $auth = array(
87
87
'subject' => 'mailto:[email protected]', // can be a mailto: or your website address
88
88
'publicKey' => '~88 chars', // uncompressed public key P-256 encoded in Base64-URL
89
89
'privateKey' => '~44 chars', // in fact the secret multiplier of the private key encoded in Base64-URL
90
+
'pemFile' => 'path/to/pem', // if you have a PEM file and can link to it on your filesystem
91
+
'pem' => 'pemFileContent', // if you have a PEM file and want to hardcode its content
0 commit comments