Giter VIP home page Giter VIP logo

authchain's Introduction

Laravel 4 chain authentication provider

Supports native database, LDAP, IMAP and ip address multi-domain authentication for single sign-on.

For LDAP and IMAP authentication you need to have ldap and imap php extensions.

Installation

Installing this package through Composer. Edit your project's composer.json file to require restricted/authchain.

"require": {
	"laravel/framework": "4.1.*",
	"restricted/authchain": "1.0.*"
},
"minimum-stability" : "dev"

Update Composer from the Terminal:

composer update

Once this operation completes, the next step is to add the service provider. Open app/config/app.php, and add a new item to the providers array.

'providers' => [
    // ..
    'Restricted\Authchain\AuthchainServiceProvider'
]

Create example configuration file from terminal:

php artisan config:publish restricted/authchain

Finally, change default authentication provider to authchain. Open app/config/auth.php and change driver section to authchain.

Please see app/config/packages/restricted/authchain/config.php for configuration instructions.

You need to create User model in app/models and create migration. For details on models and migrations you can see vendor/restricted/authchain/quickstart

Simply copy contents of folder vendor/restricted/authchain/quickstart/models/ to app/models. Example migration can be executed by command php artisan migrate --package="restricted/authchain". NOTE: migration does`t include timestamps.

If you don't use ip address authentication, set ['defaults']['ip'] to false in app/config/packages/restricted/authchain/config.php.

Quickstart

Install laravel (see http://laravel.com/docs/quick)

composer create-project laravel/laravel your-project-name --prefer-dist

Install authchain provider (see Installation)

Configure your domains in app/config/packages/restricted/authchain/config.php

Copy files from vendor/restricted/authchain/quickstart/models/ to app/models vendor/restricted/authchain/quickstart/controllers/ to app/controllers vendor/restricted/authchain/quickstart/views/ to app/views

Add to your app/filters.php contents from vendor/restricted/authchain/quickstart/filter.php

Add to your app/routes.php contents from vendor/restricted/authchain/quickstart/routes.php

Serve your application from terminal: php artisan serve

Go to http://localhost:8000/ and enjoy!

License

Distributed under the terms of the MIT license.

authchain's People

Contributors

restricted avatar bbalon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.