Download the PHP package kerchuma222/session-auth without Composer

On this page you can find all versions of the php package kerchuma222/session-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package session-auth

Session Based Authentication

Laravel 5 Session Authentication driver.

Implemented Features

Installation

To install this driver in your application, add the following to your composer.json file

Then run composer update. NOTE: You may have to run composer with the --prefer-source flag in order to install this from GitHub. You will also need git installed on your machine. This is temporary and will be resolved when this is hosted on packagist.

Once you have finished downloading the package from GitHub you need to tell your Application to use the session-auth service provider.

Open app/config/app.php and find

Illuminate\Auth\AuthServiceProvider::class

and replace it with

KerchumA222\SessionAuth\SessionAuthServiceProvider::class

This tells Laravel 5 to use the service provider from the vendor folder.

You also need to direct Auth to use the session driver instead of Eloquent or Database, edit config/auth.php and change driver to session

Configuration

No configuration needed in the client application. The Authenticating application needs to store user details in the shared Session in the key 'currentUser'. The required details of the currentUser are 'id', 'username' (or whatever your primary identifier is), and 'remember_token' (for remembering users in the child applications without going back to the authentication application).

Example

In your authentication application (which should NOT include this plugin) Session::put('currentUser', ['id'=>1, 'username'=>'KerchumA222', 'remember_token'=>'xxxxxxx', 'groups'=>['Admin', 'User']]); This can be conveniently done in the Authentication.php middleware.

Usage

Use of Auth is the same as with the default service provider. Auth::user() returns an instance of GenericUser with all the details stored in Session by the parent application.

Model Usage

You do not use a model with this implementation.


All versions of session-auth with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version ~5.1
illuminate/auth Version ~5.1
illuminate/config Version ~5.1
illuminate/session Version ~5.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kerchuma222/session-auth contains the following files

Loading the files please wait ...