https://github.com/oyale/pwpush-php
A PHP wrapper to easily push passwords to pwpush.com
https://github.com/oyale/pwpush-php
password-pusher php
Last synced: 5 months ago
JSON representation
A PHP wrapper to easily push passwords to pwpush.com
- Host: GitHub
- URL: https://github.com/oyale/pwpush-php
- Owner: oyale
- License: lgpl-2.1
- Created: 2022-01-20T04:11:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-30T20:24:59.000Z (10 months ago)
- Last Synced: 2024-11-13T03:14:53.728Z (7 months ago)
- Topics: password-pusher, php
- Language: PHP
- Homepage: https://packagist.org/packages/oyale/pwpush-php
- Size: 30.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/oyale/PwPush-PHP/actions/workflows/php.yml) [](https://packagist.org/packages/oyale/pwpush-php)
[](https://github.com/oyale/PwPush-PHP/releases)
# PwPush-PHP> A PHP library wrapper to easily push passwords to any [PasswordPusher](https://github.com/pglombardo/PasswordPusher) instance

## Install
```bash
composer require oyale/pwpush-php
```## Usage
```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");
```## `PwPush::push` Parameters
### `$secret`
**Required**. \
The secret to be pushed\
Type: `string`### `$options`
Type: `array` \
Default value: `server configuration`### `$urlBase`
URL of PwPush instance \
Type: `string` \
Default value: `https://pwpush.com`### `$validate`
Validate JSON against schema prior to push secret\
Type: `bool` \
Default value: `false`### Options
`$options` is a key-value array. Valid options are:#### expire_after_days
Number of days until the password is deleted.\
Type: `integer` \
Default value: `server configuration`#### expire_after_views
Number of visualizations until the password is deleted.\
Type: `integer` \
Default value: `server configuration`#### retrieval_step
Helps to avoid chat systems and URL scanners from eating up views.\
Type: `bool` \
Default value: `server configuration`#### deletable_by_viewer
Allow users to delete passwords once retrieved.\
Type: `bool` \
Default value: `server configuration`## `PwOps` Parameters
### `token`
**Required**. \
Token for the secret\
Type: `string`### `$urlBase`
URL of PwPush instance \
Type: `string` \
Default value: `https://pwpush.com`## Examples
You can see a complete workflow example in [examples/workflow.php](examples/workflow.php)## License
[LGPL-3.0](LICENSE)