2017 © Pedro PelĆ”ez
 

cakephp-plugin cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

image

oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  • Thursday, September 28, 2017
  • by oefenweb
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9,182 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 13 Versions
  • 5 % Grown

The README.md

UniLogin plugin for CakePHP

Build Status PHP 7 ready Coverage Status Packagist downloads Code Climate Scrutinizer Code Quality, (*1)

This plugin handles (single sign on) authentication with UNI•Login. UNI•Login is a service that provides authentication, access control and user administration to providers of web-based applications in the educational sector., (*2)

Requirements

  • CakePHP 2.9.0 or greater.
  • PHP 7.0.0 or greater.

Installation

Clone/Copy the files in this directory into app/Plugin/UniLogin, (*3)

Configuration

Ensure the plugin is loaded in app/Config/bootstrap.php by calling:, (*4)

CakePlugin::load('UniLogin');

Ensure to configure the following lines in app/Config/bootstrap.php:, (*5)

// 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

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., (*6)

The Versions

28/09 2017

dev-master

9999999-dev http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

28/09 2017

v0.2.8

0.2.8.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

04/05 2017

v0.2.7

0.2.7.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

05/04 2017

v0.2.6

0.2.6.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

28/05 2016

v0.2.5

0.2.5.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

01/04 2016

v0.2.4

0.2.4.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

01/04 2016

v0.2.3

0.2.3.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

01/04 2016

v0.2.2

0.2.2.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

09/03 2016

v0.2.1

0.2.1.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

16/02 2016

v0.2.0

0.2.0.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

27/12 2014

v0.1.2

0.1.2.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

23/12 2014

v0.1.1

0.1.1.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp

17/12 2014

v0.1.0

0.1.0.0 http://github.com/Oefenweb/cakephp-uni-login

A UNI•Login (Authentication ) Plugin for CakePHP

  Sources   Download

MIT

The Requires

 

authentication cakephp