2017 © Pedro Peláez
 

project singleso

Single Sign-On System

image

singleso/singleso

Single Sign-On System

  • Friday, July 29, 2016
  • by AlexanderOMara
  • Repository
  • 1 Watchers
  • 1 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

SingleSO

A Single Sign-On server for a private central account system with an OAuth 2 service provider and support for login through third-party account system providers., (*1)

Installation

1: Install the package as a project., (*2)

composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist --stability=dev singleso/singleso singleso

2: Copy the *.sample.php files in the config directory renaming them without .sample and configure all the settings., (*3)

3: From the project root, run the database migrations., (*4)

php singleso migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrations
php singleso migrate/up

4: Ideally configure your web server to serve the web folder as the document root., (*5)

5: For pretty URL's (enabled by default in the config settings), in the web directory, create an .htaccess like the following (or otherwise configure your server to achieve the same result)., (*6)

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

(If not configured to be the root of the domain, you will need to adjust the RewriteBase path to match)., (*7)

6: Access the web front end and register an account, following the link in the email to finish registering., (*8)

7: Access your database through the interface of your choice and update the is_admin column of the user table for the user you just created., (*9)

Theming

You can add or replace default styling using a custom theme., (*10)

An example custom theme can be created by creating the following files in the themes directory., (*11)

themes/
- example-theme/
- - static/
- - - theme.css
- - - theme.js
- - theme.json

theme.json, (*12)

{
    "name": "Example Theme",
    "sourcePath": "static",
    "css": [
        "theme.css"
    ],
    "js": [
        "theme.js"
    ],
    "depends": [
        "app\\assets\\DefaultThemeAsset"
    ],
    "bootstrap": true,
    "juiTheme": true
}

theme.css, (*13)

.navbar-brand {
    background: blue;
}

theme.js, (*14)

(function() {
    'use strict';
    var navbarBrand = document.querySelector('.navbar-brand');
    var text = navbarBrand.textContent;
    var toggle = false;
    setInterval(function() {
        navbarBrand.textContent = toggle ? text : 'Sample Theme JavaScript!';
        toggle = !toggle;
    }, 1000);
})();

Bugs

If you find a bug or have compatibility issues, please open a ticket under issues section for this repository., (*15)

License

Licensed under the Mozilla Public License, v. 2.0., (*16)

The Versions