Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/superbrave/auth0-http-client
Auth0 API client authentication for the Symfony HTTP client.
https://github.com/superbrave/auth0-http-client
auth0 http-client jwt machine-to-machine php php7 symfony symfony-component
Last synced: 3 months ago
JSON representation
Auth0 API client authentication for the Symfony HTTP client.
- Host: GitHub
- URL: https://github.com/superbrave/auth0-http-client
- Owner: superbrave
- License: mit
- Created: 2019-08-02T07:08:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T10:38:09.000Z (10 months ago)
- Last Synced: 2024-09-30T17:23:06.717Z (3 months ago)
- Topics: auth0, http-client, jwt, machine-to-machine, php, php7, symfony, symfony-component
- Language: PHP
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auth0 HTTP client
[![Latest version on Packagist][ico-version]][link-version]
[![Software License][ico-license]][link-license]
[![Build Status][ico-build]][link-build]
[![Coverage Status][ico-coverage]][link-coverage]
[![Code Quality][ico-code-quality]][link-code-quality][Auth0][link-auth0] API client authentication for the Symfony HTTP client.
## Installation using Composer
Run the following command to add the package to the composer.json of your project:``` bash
$ composer require superbrave/auth0-http-client symfony/http-client
```The `symfony/http-client` can be replaced with any other HTTP client implementing the Symfony HTTP client contracts.
## Usage
The following example shows how to create the instances required to do an API call authenticated through Auth0:
```php
request('GET', 'https://superbrave.nl/api');
```Optionally, a custom cache instance can be injected into the `AuthZeroAuthenticatingHttpClient`. The cache will store
the access tokens (JWT) for the configured TTL returned by Auth0.## License
The Auth0 HTTP client is licensed under the MIT License. Please see the [LICENSE file][link-license] for details.[ico-version]: https://img.shields.io/packagist/v/superbrave/auth0-http-client
[ico-license]: https://img.shields.io/packagist/l/superbrave/auth0-http-client
[ico-build]: https://scrutinizer-ci.com/g/superbrave/auth0-http-client/badges/build.png?b=master
[ico-coverage]: https://scrutinizer-ci.com/g/superbrave/auth0-http-client/badges/coverage.png?b=master
[ico-code-quality]: https://scrutinizer-ci.com/g/superbrave/auth0-http-client/badges/quality-score.png?b=master[link-version]: https://packagist.org/packages/superbrave/auth0-http-client
[link-license]: LICENSE
[link-build]: https://scrutinizer-ci.com/g/superbrave/auth0-http-client/build-status/master
[link-coverage]: https://scrutinizer-ci.com/g/superbrave/auth0-http-client/build-status/master
[link-code-quality]: https://scrutinizer-ci.com/g/superbrave/auth0-http-client/build-status/master
[link-auth0]: https://auth0.com