A PHP library wrapper to easily push passwords to any PasswordPusher instance
composer require oyale/pwpush-php
// Push a secret (returns the URL)
PwPush::push(string $secret, ?array $options[] = null, ?string $urlBase = 'https://pwpush.com', ?bool $validate = false);
// Retrieve a secret
PwOps::get(string $token, ?string $urlBase="https://pwpush.com");
# Delete a secret
PwOps::delete(string $token, ?string $urlBase="https://pwpush.com");
Required.
The secret to be pushed
Type: string
Type: array
Default value: server configuration
URL of PwPush instance
Type: string
Default value: https://pwpush.com
Validate JSON against schema prior to push secret
Type: bool
Default value: false
$options
is a key-value array. Valid options are:
Number of days until the password is deleted.
Type: integer
Default value: server configuration
Number of visualizations until the password is deleted.
Type: integer
Default value: server configuration
Helps to avoid chat systems and URL scanners from eating up views.
Type: bool
Default value: server configuration
Allow users to delete passwords once retrieved.
Type: bool
Default value: server configuration
Required.
Token for the secret
Type: string
URL of PwPush instance
Type: string
Default value: https://pwpush.com
You can see a complete workflow example in examples/workflow.php