PHPackages                             immense/macaroons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. immense/macaroons

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

immense/macaroons
=================

PHP implementation of Macaroons

2.0.0(6y ago)2752.2k↓34.2%3[1 PRs](https://github.com/immense/php-macaroons/pulls)1MITPHPPHP &gt;=7.2.0

Since Apr 22Pushed 10mo ago9 watchersCompare

[ Source](https://github.com/immense/php-macaroons)[ Packagist](https://packagist.org/packages/immense/macaroons)[ RSS](/packages/immense-macaroons/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (23)Used By (1)

Macaroons
---------

[](#macaroons)

[![Build Status](https://camo.githubusercontent.com/1c2b8611feaea8d3a80063ffdc4a24bec8d4b398b3f99e05feb403a778118899/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696d6d656e73652f7068702d6d616361726f6f6e732e737667)](https://travis-ci.org/immense/php-macaroons)[![Latest Stable Version](https://camo.githubusercontent.com/0db7db9a0cbf9f4c095beddf632ca785673f6661f24d16114a3a472911266fe0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696d6d656e73652f6d616361726f6f6e732e737667)](https://packagist.org/packages/immense/macaroons)[![License](https://camo.githubusercontent.com/1a25b7cabc3a74cb1efdb74ba2ed0696cf74adf7e2491d02b00c0acc289561f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696d6d656e73652f6d616361726f6f6e732e737667)](https://packagist.org/packages/immense/macaroons)[![Coverage Status](https://camo.githubusercontent.com/59e13532409cd1115ef8495e2224e642a7c0f5b79c67b24e5d4e2a2bbd81b3c1/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f696d6d656e73652f7068702d6d616361726f6f6e732e737667)](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
------------

[](#requirements)

- [PHP &gt;= 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`
--------------------------

[](#installing-libsodium-php)

- OS X using [homebrew](https://github.com/Homebrew/homebrew)

    ```
    brew tap homebrew/php
    brew install php55-libsodium
    ```
- Using `pecl`

    ```
    pecl install libsodium
    ```

Installation via [composer](https://getcomposer.org)
----------------------------------------------------

[](#installation-via-composer)

In your project directory:

- Create a `composer.json` in your project if necessary

    ```
    composer init
    ```
- Install the latest version as a project dependency

    ```
    composer require immense/macaroons
    ```

Tests
-----

[](#tests)

N.B. phpunit 5 requires PHP &gt;= 5.6

Files must end with `Test` e.g. `ClassTest.php`

- From the `php-macaroons` root directory:

    ```
    phpunit
    ```
- Run tests on file change (optional)

    ```
    gem install watchr
    watchr ./autotest-watchr.rb
    ```

License
-------

[](#license)

[php-macaroons](https://github.com/immense/php-macaroons) is licensed under the MIT license. Please see the [license](MIT-LICENSE) for more information.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 97.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~86 days

Recently: every ~405 days

Total

20

Last Release

2405d ago

Major Versions

0.5.4 → 1.0.02015-12-24

1.0.0 → 2.0.02019-10-17

PHP version history (3 changes)0.1.0PHP &gt;=5.3.6

0.5.4PHP &gt;=5.3.0

2.0.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9b5099ac53735e6e5482b7b2cbc8063ee2f931643bf311b9969d804ced7bf6e?d=identicon)[immensenet](/maintainers/immensenet)

---

Top Contributors

[![cmckni3](https://avatars.githubusercontent.com/u/735717?v=4)](https://github.com/cmckni3 "cmckni3 (93 commits)")[![bosko-htec](https://avatars.githubusercontent.com/u/54990036?v=4)](https://github.com/bosko-htec "bosko-htec (1 commits)")[![cmbankester](https://avatars.githubusercontent.com/u/337779?v=4)](https://github.com/cmbankester "cmbankester (1 commits)")

---

Tags

Authenticationauthorizationmacaroons

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/immense-macaroons/health.svg)

```
[![Health](https://phpackages.com/badges/immense-macaroons/health.svg)](https://phpackages.com/packages/immense-macaroons)
```

###  Alternatives

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[league/oauth2-client

OAuth 2.0 Client Library

3.8k118.6M1.2k](/packages/league-oauth2-client)[hybridauth/hybridauth

PHP Social Authentication Library

3.4k8.5M94](/packages/hybridauth-hybridauth)[league/oauth1-client

OAuth 1.0 Client Library

99898.8M106](/packages/league-oauth1-client)[lusitanian/oauth

PHP 7.2 oAuth 1/2 Library

1.1k23.2M121](/packages/lusitanian-oauth)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

42121.2M118](/packages/league-oauth2-google)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
