PHPackages                             oefenweb/cakephp-uni-login - 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. oefenweb/cakephp-uni-login

ActiveCakephp-plugin[Authentication &amp; Authorization](/categories/authentication)

oefenweb/cakephp-uni-login
==========================

A UNI•Login (Authentication ) Plugin for CakePHP

v2.0.0(7y ago)011.4k1[1 issues](https://github.com/Oefenweb/cakephp-uni-login/issues)MITPHPPHP &gt;=7.0.0

Since Dec 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Oefenweb/cakephp-uni-login)[ Packagist](https://packagist.org/packages/oefenweb/cakephp-uni-login)[ Docs](http://github.com/Oefenweb/cakephp-uni-login)[ RSS](/packages/oefenweb-cakephp-uni-login/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (16)Used By (0)

UniLogin plugin for CakePHP
===========================

[](#unilogin-plugin-for-cakephp)

[![Build Status](https://camo.githubusercontent.com/1628e0934b54eecaa717689ff0df7cd9e0d60ad3a5e46d616e4e7f073c210cee/68747470733a2f2f7472617669732d63692e6f72672f4f6566656e7765622f63616b657068702d756e692d6c6f67696e2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Oefenweb/cakephp-uni-login)[![PHP 7 ready](https://camo.githubusercontent.com/2e0ab3679f6cded796bdfb82e593e1e6f664fd624d78af67451c2ba32dd870c8/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f4f6566656e7765622f63616b657068702d756e692d6c6f67696e2f62616467652e737667)](https://travis-ci.org/Oefenweb/cakephp-uni-login)[![Coverage Status](https://camo.githubusercontent.com/8eff9245833c8103cd820e4f872e7f2b544f0ab8ede3004746c602533ef91046/68747470733a2f2f636f6465636f762e696f2f67682f4f6566656e7765622f63616b657068702d756e692d6c6f67696e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Oefenweb/cakephp-uni-login)[![Packagist downloads](https://camo.githubusercontent.com/249d215e2bcfd5f681e1ede8b2eec3a66b5a8686921b7af35dd294d765b910ba/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4f6566656e7765622f63616b657068702d756e692d6c6f67696e2e737667)](https://packagist.org/packages/oefenweb/cakephp-uni-login)[![Code Climate](https://camo.githubusercontent.com/99b0cb8731e5f2c5fb1f725235ee83639a2b02e456153a2deecf4af9e007d043/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4f6566656e7765622f63616b657068702d756e692d6c6f67696e2f6261646765732f6770612e737667)](https://codeclimate.com/github/Oefenweb/cakephp-uni-login)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9b5018f1f6d095ab95c6397304153d4b0be0cedabfdec33ee9d4dbfce205db75/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f6566656e7765622f63616b657068702d756e692d6c6f67696e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Oefenweb/cakephp-uni-login/?branch=master)

This plugin handles (single sign on) authentication with [UNI•Login](http://www.stil.dk/It-og-administration/Brugere-og-adgangsstyring/For-laerere-og-elever). UNI•Login is a service that provides authentication, access control and user administration to providers of web-based applications in the educational sector.

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

[](#requirements)

- CakePHP 2.9.0 or greater.
- PHP 7.0.0 or greater.

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

[](#installation)

Clone/Copy the files in this directory into `app/Plugin/UniLogin`

Configuration
-------------

[](#configuration)

Ensure the plugin is loaded in `app/Config/bootstrap.php` by calling:

```
CakePlugin::load('UniLogin');

```

Ensure to configure the following lines in `app/Config/bootstrap.php`:

```
// Application / plugins communication
Configure::write('UniLogin.application.completeUrl', '/uni_login_logins/login_complete');
Configure::write('UniLogin.application.secret', 'appSecret');

// Plugins provider communication
Configure::write('UniLogin.provider.url', 'https://sli.emu.dk/unilogin/login.cgi');
Configure::write('UniLogin.provider.applicationId', '1');
Configure::write('UniLogin.provider.secret', 'providerSecret');

// Plugins (test)provider communication
Configure::write('UniLogin.testProvider.defaultRedirectUrl', '/uni_login/uni_login/callback');
Configure::write('UniLogin.testProvider.applicationId', '1');
Configure::write('UniLogin.testProvider.user', 'testUser');

```

Usage
-----

[](#usage)

### Minimal setup for UniLogin login procedure

[](#minimal-setup-for-unilogin-login-procedure)

```
class UsersController extends AppController {

	public function login_start() {
		$returnUrl = Router::url(['action' => 'login_complete']);
		$url = ['plugin' => 'uni_login', 'controller' => 'uni_login', 'action' => 'login', '?' => ['returnUrl' => $returnUrl]];
		return $this->redirect($url);
	}

	public function login_complete() {
		$secret = Configure::read('UniLogin.application.secret');
		if (!hash_equals($secret, $this->request->data('secret'))) {
			throw new ForbiddenException();
		}

		if ($this->request->data('validated') === true) {
			$key = $this->request->data('user');

			// Find application user by key and login user
		}
	}

}

```

The `UsersController::login_start` starts the UniLogin login procedure, the `UsersController::login_complete` handles the callback from UniLogin.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 72.5% 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 ~107 days

Recently: every ~157 days

Total

15

Last Release

2665d ago

Major Versions

v0.2.8 → v1.0.02018-08-24

v1.0.1 → v2.0.02019-01-23

PHP version history (4 changes)v0.1.0PHP &gt;=5.3.10

v0.2.0PHP &gt;=5.4.16

v1.0.0PHP &gt;=5.6.0

v2.0.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8408dd4d7c016002e99aa4bdb978519a5a1966ce14f7afc90b5830dbe864500a?d=identicon)[oefenweb](/maintainers/oefenweb)

---

Top Contributors

[![tersmitten](https://avatars.githubusercontent.com/u/3392962?v=4)](https://github.com/tersmitten "tersmitten (37 commits)")[![mvdriel](https://avatars.githubusercontent.com/u/408052?v=4)](https://github.com/mvdriel "mvdriel (14 commits)")

---

Tags

cakephpcakephp-pluginphppluginuni-loginunilogin-login-procedureuser-managementAuthenticationcakephp

### Embed Badge

![Health badge](/badges/oefenweb-cakephp-uni-login/health.svg)

```
[![Health](https://phpackages.com/badges/oefenweb-cakephp-uni-login/health.svg)](https://phpackages.com/packages/oefenweb-cakephp-uni-login)
```

###  Alternatives

[cakedc/users

Users Plugin for CakePHP

524897.0k16](/packages/cakedc-users)[uzyn/cakephp-opauth

Opauth plugin for CakePHP v2.x, allowing simple plug-n-play 3rd-party authentication with CakePHP

129276.5k](/packages/uzyn-cakephp-opauth)[admad/cakephp-jwt-auth

CakePHP plugin for authenticating using JSON Web Tokens

160680.3k8](/packages/admad-cakephp-jwt-auth)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

129228.6k10](/packages/dereuromark-cakephp-tinyauth)[cakedc/auth

Auth objects for CakePHP

31630.0k2](/packages/cakedc-auth)[muffin/oauth2

CakePHP 3 authentication using the league/oauth2-client family

27103.4k](/packages/muffin-oauth2)

PHPackages © 2026

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