Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/richardhj/oauth2-epost
OAuth 2.0 Client Provider for E-POSTBUSINESS API.
https://github.com/richardhj/oauth2-epost
deutsche-post epost epostbusiness-api oauth2 oauth2-client php-league
Last synced: 7 days ago
JSON representation
OAuth 2.0 Client Provider for E-POSTBUSINESS API.
- Host: GitHub
- URL: https://github.com/richardhj/oauth2-epost
- Owner: richardhj
- License: gpl-3.0
- Created: 2016-10-01T19:39:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-26T13:18:20.000Z (over 6 years ago)
- Last Synced: 2024-07-06T03:36:59.930Z (4 months ago)
- Topics: deutsche-post, epost, epostbusiness-api, oauth2, oauth2-client, php-league
- Language: PHP
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# E-POSTBUSINESS Provider for OAuth 2.0 Client
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]]()
[![Dependency Status][ico-dependencies]][link-dependencies]This package provides E-POSTBUSINESS API OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).
## Install
Via Composer
``` bash
$ composer require richardhj/oauth2-epost
```## Usage
The provider supports _Authorization Code Grant_ as well as _Resource Owner Password Credentials Grant_. I recommend reading these usage instructions before: https://github.com/thephpleague/oauth2-client#usage
But instead of the `GenericProvider` you're going to use this provider.This is how to initiate the provider:
```php
$provider = new EPost\OAuth2\Client\Provider\EPost(
[
'clientId' => sprintf('%s,%s', EPOST_DEV_ID, EPOST_APP_ID),
'redirectUri' => 'http://localhost:8080/oauth2_redirect.php', // Only necessary for the Authorization Code Grant flow
'scopes' => ['create_letter', 'send_hybrid'],
'lif' => EPOST_LIF_CONTENT,
'enableTestEnvironment' => true,
]
);
```## License
The GNU Lesser General Public License (LGPL).
[ico-version]: https://img.shields.io/packagist/v/richardhj/oauth2-epost.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-LGPL-brightgreen.svg?style=flat-square
[ico-dependencies]: https://www.versioneye.com/php/richardhj:oauth2-epost/badge.svg?style=flat-square[link-packagist]: https://packagist.org/packages/richardhj/oauth2-epost
[link-dependencies]: https://www.versioneye.com/php/richardhj:oauth2-epost