Download the PHP package risan/laravel-auth-service without Composer

On this page you can find all versions of the php package risan/laravel-auth-service. 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 laravel-auth-service

Laravel Authentication Service

Build Status HHVM Status StyleCI Scrutinizer Code Quality Code Coverage SensioLabs Insight Latest Stable Version License

Stateful authentication service provider for the latest Laravel 5.2 version.

Laravel already offers a handy way to provide user authentication functionality. Laravel framework ships with AuthenticatesUsers trait which can be injected to your authentication controller. And actually, by default the provided AuthController class are using this handy trait.

This package's intention is to replace the AuthenticatesUsers trait from your authentication controller. By extracting the authentication logic into a seperate service provider, your authentication controller will be a lot more clean and readable.

This package is only for the latest Laravel 5.2 version and only supports the StatefulGuard implementation.

Table of Contents

Dependencies

This package relies on the following libraries:

Installation

Package Installation

To install this library using Composer, simply run the following command inside your Laravel project directory:

Or you may also add risan/laravel-auth-service package into your composer.json file:

Once the dependency is added, run the install command:

Service Provider Registration

Once the package has been installed, you need to register package's service provider. Open your config/app.php file, and add AuthService\AuthServiceProvider::class into your providers list like so:

Facade Registration

If you would like to use facade to access this package, you need to register the AuthService\Facades\AuthService::class in aliases directive. Open up your config/app.php file, and update the aliases directive like so:

This way, you may access the package functionality using AuthService facade.

Publish Configuration File

The last step to setup this package is to publish the configuration file. On your command prompt, run the following artisan command:

This command will copy a default package's configuration file in config/authservice.php.

Configuration

Once the package's configuration file is published, you may locate the file in config\authservice.php. The default configuration file will look like this:

Available Methods

Login

To log the user in, simply call the login() method:

This method will attempt to log the user in and will return an instance of Illuminate\Http\RedirectResponse.

Logout

To log the user out, we may use the logout() method:

This method will also return an instance of Illuminate\Http\RedirectResponse.

Basic Usage

Here is some basic example to perform login and logout functionality, assuming that we are using the facade.

Implementation in AuthController

For a complete implementation, we will create a simple authentication controller that handles the login and logout request.

Using Facade

Without Facade


All versions of laravel-auth-service with dependencies

PHP Build Version
Package Version
Requires illuminate/routing Version ~5.2
illuminate/contracts Version ~5.2
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 risan/laravel-auth-service contains the following files

Loading the files please wait ....