Download the PHP package codebot/laravel-usub without Composer

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

Build Status

About laravel-usub

Laravel package for authenticated user substitution to login as other users. You will find this package useful when your client says "As an admin I want to be authenticated and act as chosen user without typing password, and want to back to my admin dashboard by single click.".

Installation

You need complete UsubSignIn middleware to implement permissions. For example:

Configuration

expiration - Usub token expiration time in minutes.

length - Length of generated usub token.

redirect_to_on_sign_in - Default URL where user will be redirected on sign in whenever it's not overridden by redirect_to_on_sign_in key in request, e.g. by hidden input field.

redirect_to_on_sign_out - Default URL where user will be redirected on sign out whenever it's not overridden by redirect_to_on_sign_out key in request, e.g. by hidden input field.

redirect_to_on_cookie_expiration - URL where user will be redirected when token cookie expired.

forget_cookies_on_sign_out - Array of cookie names that will be removed from browser on sign out and usub token expiration.

You can change the configuration in your .env file if you need to.

Usage

Once you have package installed, following routes are registered:

An example of html form that can be used to sign in as specific user:

If you won't specify on_sign_in and on_sign_out values, then it will use defaults from the config/usub.php config file.

An example of html form that can be used to sign out and back to admin dashboard (or whatever page you need):

Cleanup

To delete expired tokens from the usub_tokens database table, you can use php artisan usub:clear command.


All versions of laravel-usub with dependencies

PHP Build Version
Package Version
Requires php Version ^7.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 codebot/laravel-usub contains the following files

Loading the files please wait ....