2017 © Pedro Peláez
 

library stormpath

A drop in replacement for Laravel 4 Auth Driver.

image

lamarus/stormpath

A drop in replacement for Laravel 4 Auth Driver.

  • Tuesday, October 1, 2013
  • by bretterer
  • Repository
  • 1 Watchers
  • 6 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Stormpath drop in replacement for Laravel 4 Auth

This is a provider for adding a stormpath driver to your auth system for laravel 4.
endorse, (*1)

What is Stormpath?

logo, (*2)

Stormpath is the first easy and secure user management and authentication service for developers. With a simple REST API integration, developers can reduce development and operations costs, while protecting users with best-in-class security., (*3)

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require lamarus/stormpath., (*4)

"require": {
    "laravel/framework": "4.0.*",
    "lamarus/stormpath": "dev-master"
},
"minimum-stability" : "dev"

Next, update Composer from the Terminal:, (*5)

composer update

After the command completes, Run the following command, (*6)

php artisan config:publish lamarus/stormpath

Then, go to app/config/packages/lamarus/stormpath/config.php and put in your id, secret, and your applicationId., (*7)

Once you have added your configuration, add the service provider. Open app/config/app.php, and add a new item to the providers array., (*8)

'Lamarus\Stormpath\StormpathServiceProvider'

The final step is to change your auth driver. Open app/config/auth.php, and change the driver to stormpath, (*9)

Usage

This driver replacement has been created to make it easy to replace the current auth. All the commands are the same and are used just like the current way., (*10)

Examples

Route::get('attempt', function() {
    $user = Auth::attempt(array('username' => 'test', 'password' => '1234Abcd'));
});

Route::get('check',function() {
    Auth::check();
});

Route::get('loginUsingId',function() {
    $user = 'xXxXxXxX'; // the id from stormpath for the user
    Auth::loginUsingId($user);
});

Route::get('once', function() {
    Auth::once(array('username' => 'test', 'password' => '1234Abcd'));
});

Route::get('login', function() {
    $user = new \Lamarus\Stormpath\StormpathUser('https://api.stormpath.com/v1/accounts/xXxXxXxX');
    Auth::login($user);
});

Route::get('logout', function() {
    Auth::logout();
});

The Versions

01/10 2013

dev-master

9999999-dev

A drop in replacement for Laravel 4 Auth Driver.

  Sources   Download

The Requires