Download the PHP package jhumanj/laravel-signed-auth-middleware without Composer

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

Laravel Signed Auth Middleware


A simple, safe magic login link generator for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This packages allows you to generate links that will authenticate your users. You can use this for password-less applications, or simply to authenticate users from links your application sends (via email, text message etc.).

Why this package

I started to use laravel-passwordless-login package by grosv and it worked very well. Unfortunately, because of the redirection, I had some troubles with Google analytics and UTM tracking. I wanted to extend the package, but then realized that there wasn't a trivial solution, as utm tracking parameters should not be used in the context of intenal website navigation. Hence I created this package, which is very strongly inspired by laravel-passwordless-login.

Signed Auth Middleware package allows you to generate signed links that will automatically authenticate your users using a middleware (without any redirect). Unlike laravel-passwordless-login, this package does not support the use-once link feature.

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Usage

Setting up middleware

The first thing to do is to setup the middleware. The middleware needs to be registered before the auth middleware. You can achieve that by adding the HasSignedAuth trait to your App\Http\Kernel.php file:

Then you have two options: use the middleware on all or your routes or not. To add the middleware to all your routes, add the middleware to the web middleware group.

Now if you don't want to use the middleware on all of your web routes you can also define a route middleware like this:

And then use it as follows in your route file:

Creating auth signed links

Here is how to generate a signed link that will authenticate your users:

You can also override the default expiry time:

Or you set it to never expire:

If you need to add some more parameters, just proceed as you would do it with the normal route() method:

Testing

Please make sure that all package tests are running successfully before sending a pull request.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please contribute if you want to help me maintain this package or just make it better. Be nice to each other.

Reporting Issues

For security issues, please contact me directly on twitter or via email at [email protected]. For any other problems, use the issue tracker here.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-signed-auth-middleware with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
spatie/laravel-package-tools Version ^1.1
illuminate/contracts Version ^8.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 jhumanj/laravel-signed-auth-middleware contains the following files

Loading the files please wait ....