Download the PHP package malezha/sentry-auth-laravel without Composer

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

Sentry Auth Driver for Laravel

Build Status Dependency Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

Package is no longer supported.

Fork based on hampel/sentry-auth-laravel.

Allows you to use built-in Laravel Auth routines with Cartalyst Sentry.

Laravel's built-in Auth routines allow you to configure an authentication driver for your application, which includes functionality such as sending out password reset emails.

While Cartalyst's Sentry provides the same functionality, it does so in a different and non-compatible manner, so you need to rewrite all Auth routines to use Sentry's API - you can't just change the Auth driver in Laravel.

This package allows you to do exactly that - install Sentry, install this driver and you can then configure the built-in Auth driver to use "sentry" for authentication. You'll still need to extend the functionality to implement Sentry's advanced features such as groups, permissions, login throttling and such - but at least you don't need to completely rewrite your default Auth provider.

Ideally, Cartalyst would provide this wrapper functionality as part of their own Sentry package, but until then, hopefully this package will be useful to some people.

By Simon Hampel and Oleg Isaev.

Versions

Driver Laravel Sentry
1.0.* 4.0.* 2.0.*
1.1.* 4.1.* 2.0.*
1.2.* 4.2.* 2.1.*

Installation

The recommended way of installing is through Composer:

Require the packages via Composer in your composer.json

Run Composer to update the new requirement.

Open your Laravel config file app/config/app.php and add the two service providers to the providers array:

The SentryAuthServiceProvider is where the Auth service is extended with a new "sentry" user provider.

The SentryHashServiceProvider provides a new service "sentry-hash" which provides a simple wrapper for the Sentry hashing routines.

The package also supplies an Eloquent-based User model called SentryUser, which extends the default Eloquent user model provided by Sentry and implements several required interfaces which are missing from the default Sentry model.

Make sure you've added the Sentry class alias to app/config/app.php:

Run packages migrations:

If you haven't already done so, publish your Sentry config files:

... you should find the config files in app/config/packages/cartalyst/sentry

Open your Laravel config file app/config/auth.php and set the driver to sentry:

It doesn't matter which hasher you choose to use fro Sentry, our driver will simply use the same hasher in place of the built in hasher from Laravel.

Our SentryUser model extends Sentry's User model, but also implements some of the additional interfaces required by the Laravel Auth libraries. If you have extended our SentryUser model, you should specify the name of your own model in both the Laravel auth.php config file and in the Sentry config.php file.

For example, create a new model in app/models/User.php:

You would then change app/config/auth.php, set the model to User:

Also change app/config/packages/cartalyst/sentry/config.php to also set the user model to User:

Usage

Implement user authentication for your Laravel application as normal, following the instructions in http://laravel.com/docs/security.

Either use the SentryUser model provided to replace the user model provided by Sentry, or implement your own model extending the model we have supplied.

Given that the field used as the username in Sentry can be configured, when sending user data to Auth::attempt, you should use the configured value rather than hard-coding the value in your code. There are two ways of retrieving this value:

Or you can just check the config value directly (just make sure you're not changing the login attribute name yourself dynamically at runtime!):

You can then use this in your controller (or elsewhere) for validation and authentication:

License

The package is open-sourced software licensed under the MIT license


All versions of sentry-auth-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 4.2.*
cartalyst/sentry Version 2.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 malezha/sentry-auth-laravel contains the following files

Loading the files please wait ....