2017 © Pedro Peláez
 

cakephp-plugin cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

image

aclavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  • Monday, September 25, 2017
  • by AClavijo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 81 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 17 Versions
  • 0 % Grown

The README.md

Plugin Google OpenId Connect for Cake 1.3 applications

This plugin provide Google OpenId Connect to a cake 1.3 Framework., (*1)

I try to make the installation easy. So please read the installation part :), (*2)

Dependancies

This project include one dependancie: - "google/apiclient": "^2.0" 'Documentation' - "symfony/yaml" : "3.1." 'Documentation' - "aclavijo/cakephp-installer-plugin": "0.1." Custom composer installer, (*3)

Installation

via composer

composer require aclavijo/cakeopenidconnect

When you've done the installation, composer will place the plugin in 'app/plugins/openid', (*4)

Parameter.yml

you need to create a parameter.yml in app/plugins/openid/config from the parameter.yml.dist, (*5)

Configuration

#parameters.yml
OpenidConnect:
    client_id: string
    secret_id: string
    scopes: array
    #optionnal
    domains: null|array #default null
    log_path: null|array #default null
    cake_log: false|true #default true
    flash_ctp: string #default flash_bas
  • client_id: client_id provide by google
  • secret_id: client_id provide by google
  • scopes: google openid scope ['openid', 'email', 'profile'] minimum ['openid', 'email']
  • domains: array if you want to only authorize authentification by email address domains (all other will be rejected)
  • log_path: specifie another log file path (Apache for example)
  • cake_log: false to desactivate cake logging
  • flash_ctp: name of the cake 1.3 flash template to display error loggin message

Deploy it on your project

User search fonction

  • In app/models/uilisateur.php, add the following function
    function getUserByPseudo($pseudo)
    {
        $params = array(
            'conditions' => array('Utilisateur.pseudo' => $pseudo)
        );
        $result = $this->find('first', $params);

        return $result['Utilisateur'];
    }

(optionnal) add the route to the router

  • in the file app/config/router.php
Router::connect('/openid/oauth/authentification', array('plugin' => 'openid', 'controller' => 'oauth', 'action' => 'authentification'));
  • In login.ctp:
 echo $html->link('Name your button', array(
        'plugin' => 'openid', 
        'controller' => 'oauth',
        'action' => 'authentification' 
    ), array(
        'class' => 'btn btn-primary'
    )); ?>

To do

  • Implement the log_path feature

The Versions

25/09 2017

dev-master

9999999-dev https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

25/09 2017

v0.1.15

0.1.15.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

18/09 2017

v0.1.14

0.1.14.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

24/01 2017

v0.1.13

0.1.13.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

22/12 2016

v0.1.12

0.1.12.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

21/12 2016

v0.1.11

0.1.11.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

24/11 2016

v0.1.10

0.1.10.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

24/11 2016

v0.1.9

0.1.9.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

23/11 2016

v0.1.8

0.1.8.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

23/11 2016

v0.1.7

0.1.7.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

23/11 2016

v0.1.6

0.1.6.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

23/11 2016

v0.1.5

0.1.5.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

23/11 2016

v0.1.4

0.1.4.0 https://github.com/AClavijo/cakeopenidconnect

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

22/11 2016

v0.1.3

0.1.3.0

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

22/11 2016

v0.1.2

0.1.2.0

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

22/11 2016

v0.1.1

0.1.1.0

Provide Google OpenId Connect feature for cake php 1.3

  Sources   Download

MIT

The Requires

 

by Antoine Clavijo

22/11 2016

v0.1.0

0.1.0.0

Provide Google OpenId Connect feature

  Sources   Download

The Requires