https://github.com/immense/php-macaroons
PHP implementation of Macaroons
https://github.com/immense/php-macaroons
Last synced: 3 months ago
JSON representation
PHP implementation of Macaroons
- Host: GitHub
- URL: https://github.com/immense/php-macaroons
- Owner: immense
- License: mit
- Created: 2015-04-22T16:00:26.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-02-07T23:22:57.000Z (5 months ago)
- Last Synced: 2025-03-31T12:08:52.853Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 93.8 KB
- Stars: 27
- Watchers: 10
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
## Macaroons
[](https://travis-ci.org/immense/php-macaroons)
[](https://packagist.org/packages/immense/macaroons)
[](https://packagist.org/packages/immense/macaroons)
[](https://coveralls.io/r/immense/php-macaroons?branch=master)This PHP library provides an implementation of [macaroons](http://hackingdistributed.com/2014/05/16/macaroons-are-better-than-cookies) which allow decentralized delegation, attenuation, and verification.
## Requirements
* [PHP >= 5.4.0](http://php.net)
* [libsodium 1.x](https://github.com/jedisct1/libsodium)
* [libsodium-php 1.x](https://github.com/jedisct1/libsodium-php)__Note: libsodium-php 2.x may be used with the [compatibility layer](https://github.com/jedisct1/libsodium-php#libsodium-php-1x-compatibility-api-for-libsodium-php-2x) until this package is updated.__
__libsodium is available with PHP 7.2__
## Installing `libsodium-php`
* OS X using [homebrew](https://github.com/Homebrew/homebrew)
```bash
brew tap homebrew/php
brew install php55-libsodium
```* Using `pecl`
```bash
pecl install libsodium
```## Installation via [composer](https://getcomposer.org)
In your project directory:
* Create a `composer.json` in your project if necessary
```bash
composer init
```* Install the latest version as a project dependency
```bash
composer require immense/macaroons
```## Tests
N.B. phpunit 5 requires PHP >= 5.6
Files must end with `Test` e.g. `ClassTest.php`
* From the `php-macaroons` root directory:
```bash
phpunit
```* Run tests on file change (optional)
```bash
gem install watchr
watchr ./autotest-watchr.rb
```## License
[php-macaroons](https://github.com/immense/php-macaroons) is licensed under the MIT license. Please see the [license](MIT-LICENSE) for more information.