PHPackages                             uwdoem/aliro - 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. uwdoem/aliro

ActiveLibrary

uwdoem/aliro
============

Slim.php middleware library for Authorizing users through the University of Washington Group and Person Web Services

1.0.7(8y ago)042PHP

Since Nov 17Pushed 8y ago3 watchersCompare

[ Source](https://github.com/UWEnrollmentManagement/Aliro)[ Packagist](https://packagist.org/packages/uwdoem/aliro)[ RSS](/packages/uwdoem-aliro/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (6)Versions (11)Used By (0)

[![Build Status](https://camo.githubusercontent.com/a19081ff7c08d9f33b17cc4edd47f68ffd94f320244981ba16fa2f8640cabaaf/68747470733a2f2f7472617669732d63692e6f72672f5557456e726f6c6c6d656e744d616e6167656d656e742f416c69726f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/UWEnrollmentManagement/Aliro)[![Latest Stable Version](https://camo.githubusercontent.com/993c4eac92a6b646ee523cc4050bf06d25f1661ad9a38486eab6d1d4b691eb83/68747470733a2f2f706f7365722e707567782e6f72672f7577646f656d2f616c69726f2f762f737461626c65)](https://packagist.org/packages/uwdoem/aliro)

UWDOEM/Aliro
============

[](#uwdoemaliro)

Aliro is a Middleware class for the Slim.php framework. It provides user authorization through the UW Group Web Service.

It is easy to add to a Slim.php application. Simply register Aliro as middleware, and provide a list of secured endpoints and the UW groups that are authorized to access them. Visitors will be screened for membership, and if they are not found within the provided groups, they will recieve a 401 reponse, without any content from your application.

```
$aliro_settings = array(
    'permissions' => array(
        '/post/{name}' => ['u_bonifacp_test_user', 'u_bonifacp_test_admin'],
        '/admin/{name}' => ['u_bonifacp_test_admin']
    )
);

$app = new \Slim\App(...);

$app->add(new Aliro($aliro_settings));

```

Notice
------

[](#notice)

This is *not* an official library, endorsed or supported by any party who manages or owns information accessed via GWS. This library is *not* endorsed or supported by the University of Washington Department of Enrollment Management.

Installation
------------

[](#installation)

This library is published on packagist. To install using Composer, add the `"uwdoem/aliro": "1.*"` line to your "require" dependencies:

```
{
    "require": {
        "uwdoem/aliro": "1.*"
    }
}

```

Of course it is possible to use *Aliro* without Composer by downloading it directly, but use of Composer to manage packages is highly recommended. See [Composer](https://getcomposer.org/) for more information.

Use
---

[](#use)

Once installed, you will need to provide several pieces of configuration information, before registering Aliro as middleware for you Slim application.

First you will have to define the required settings for the Group Web Service

```
    // Intialize the required settings
    define('UW_GWS_BASE_PATH', '/path/to/my/private.key');
    define('UW_GWS_SSL_KEY_PATH', '/path/to/my/private.key');
    define('UW_GWS_SSL_CERT_PATH', '/path/to/my/public_cert.pem');
    define('UW_GWS_SSL_KEY_PASSWD', 'myprivatekeypassword');  // Can be blank for no password: ''
    define('UW_GWS_VERBOSE', false);  // (Optional) Whether to include verbose cURL messages in error messages.

```

You will also need to define the similar (but distinct) settings for the Person Web Service, Aliro relies on both systems.

```
    // Intialize the required settings
    define('UW_WS_BASE_PATH', '/path/to/my/private.key');
    define('UW_WS_SSL_KEY_PATH', '/path/to/my/private.key');
    define('UW_WS_SSL_CERT_PATH', '/path/to/my/public_cert.pem');
    define('UW_WS_SSL_KEY_PASSWD', 'myprivatekeypassword');  // Can be blank for no password: ''
    define('UW_WS_VERBOSE', false);  // (Optional) Whether to include verbose cURL messages in error messages.

```

Finally, you will need to provide settings specific to Aliro, and then register the middleware for your application.

```
$aliro_settings = array(
    'permissions' => array(
        '/post/{name}' => ['u_bonifacp_test_user', 'u_bonifacp_test_admin'],
        '/admin/{name}' => ['u_bonifacp_test_admin']
    ),
    'deniedHandler' => null
);

$app = new \Slim\App(...);

$app->add(new Aliro($aliro_settings));

```

That's all there is to it. Aliro will check the groups of the current user each time they request an end-point that you have listed. If the user is a member of one of the listed groups, the endpoint is allowed to resolve. If they are not a member, a 401 is returned, along with an error JSON object.

```
//Default permissions denied response
{
  "success":false,
  "status":401,
  "previous":null,
  "current":"http:\/\/dev2.admit.washington.edu\/aliro\/public\/GWS.php\/admin\/jim",
  "next":null,
  "data":null,
  "time":"2017-11-20 02:13:37 pm",
  "error":null
}

```

You can define a custom permission denied handler in the initial settings, which will be called instead of returning JSON.

Unlisted end-points will be accessible by default. Aliro will not do any checking without a permissions rule in place.

Requirements
------------

[](#requirements)

- PHP 7.0
- uwdoem/connection 3.\*
- uwdoem/group ^1.0.10
- uwdoem/person ^1.5

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~6 days

Recently: every ~11 days

Total

9

Last Release

3047d ago

Major Versions

0.1.2 → 1.0.42017-11-20

0.1.5 → 1.0.72018-01-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b43989ce7a387c05c59282788d15171a28abf61e02614a7a005cb19ef8da2b4?d=identicon)[JASchilz](/maintainers/JASchilz)

![](https://www.gravatar.com/avatar/290ab676b0d7a71324f5e5b1cd29b339cd379449c10bb721fd3f7d7d6b7571f1?d=identicon)[BonPacific](/maintainers/BonPacific)

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

---

Top Contributors

[![BonPacific](https://avatars.githubusercontent.com/u/3277713?v=4)](https://github.com/BonPacific "BonPacific (11 commits)")[![JASchilz](https://avatars.githubusercontent.com/u/6137968?v=4)](https://github.com/JASchilz "JASchilz (2 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/uwdoem-aliro/health.svg)

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

###  Alternatives

[phlak/directory-lister

PHP directory lister

2.5k1.4k](/packages/phlak-directory-lister)[oat-sa/tao-core

TAO core extension

66136.7k74](/packages/oat-sa-tao-core)[bacula-web/bacula-web

The open source web based reporting and monitoring tool for Bacula

1537.5k](/packages/bacula-web-bacula-web)[brandembassy/slim-nette-extension

19190.2k](/packages/brandembassy-slim-nette-extension)[docler-labs/codeception-slim-module

Codeception Module for Slim framework.

13178.0k1](/packages/docler-labs-codeception-slim-module)[egroupware/openid

EGroupware OpenID Connect / OAuth2 server

1226.8k2](/packages/egroupware-openid)

PHPackages © 2026

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