Download the PHP package bpocallaghan/impersonate without Composer

On this page you can find all versions of the php package bpocallaghan/impersonate. 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 impersonate

Impersonation (Laravel Authentication)

Laravel 5 package to enable impersonation. Debugging a problem and need to login as one of your customers? This allows you to authenticate as any of your customers.

See it in action at a Laravel Admin Starter project.

Installation

Update your project's composer.json file.

Laravel <5.4 only (Laravel 5.5 has automatic package discovery)
Register the Service Provider in your config/app or in your app/Providers/AppServiceProvider.php to only allow it for development.

Usage

impersonate()->login($user) Impersonate the given user and save the currently logged in user in session.
impersonate()->logout() Logout the impersonated user and log the original user back in.
impersonate()->isActive() If the logged in user is currently being impersonated by another user.

You can register your own routes. For example you want to change the endpoints or update the middlewares, etc. If you need to do additional validation, register your own Controller and only use the above methods. You can create your own view file to handle the login / logout functionality. The view file included is mostly for reference.

Config

register_routes If the package will register the routes or if you rather prefer to add your own.
session The session keys that will be used. Save original user and if currently impersonating a user.

Publish Assets (optional)

Publish the config and view file.

In your view forms to login or logout. You can add a hidden input with name 'redirect_to' to specify the return redirect to url after login / logout.

Disclaimer

Please use the package with caution. By using this package, you agree that the contributors of this package cannot be held responsible for any damages caused by using this package.


All versions of impersonate with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
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 bpocallaghan/impersonate contains the following files

Loading the files please wait ....