2017 © Pedro Peláez
 

library sso

Social&Loyal Simple Single Sign-On

image

smoothbytes/sso

Social&Loyal Simple Single Sign-On

  • Sunday, June 17, 2018
  • by salteam
  • Repository
  • 2 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Single Sign-On for PHP (Ajax compatible)

This sso client it is based on the LegalThings/SSO developed by Jasny., (*1)

For a more indepth explanation of the SSO implementation, please read this article, (*2)

Installation

Install this library through composer, (*3)

composer require smoothbytes/sso

Usage

Broker (Client)

When creating a Jasny\SSO\Broker instance, you need to pass the server url, broker id and broker secret. The broker id and secret needs to be registered at the server (so fetched when using getBrokerInfo($brokerId))., (*4)

Be careful: The broker id SHOULD be alphanumeric. In any case it MUST NOT contain the "-" character., (*5)

Next you need to call attach(). This will generate a token an redirect the client to the server to attach the token to the client's session. If the client is already attached, the function will simply return., (*6)

When the session is attached you can do actions as login/logout or get the user's info., (*7)

$broker = new Sal\SSO\Broker($serverUrl, $brokerId, $brokerSecret);
$broker->attach();

$user = $broker->getUserInfo();
echo json_encode($user);

For more information, checkout the broker and ajax-broker examples in sso-examples., (*8)

Notes

  • This is only for login and logout to be able to register new clients you need to use SAL api

The Versions

17/06 2018

dev-master

9999999-dev https://github.com/SmoothBytes/sso

Social&Loyal Simple Single Sign-On

  Sources   Download

MIT

The Requires

 

by Gamaliel Toro

auth sso

17/06 2018

v0.0.1

0.0.1.0 https://github.com/SmoothBytes/sso

Social&Loyal Simple Single Sign-On

  Sources   Download

MIT

The Requires

 

by Gamaliel Toro

auth sso