Download the PHP package stauth/laravel-stauth without Composer
On this page you can find all versions of the php package stauth/laravel-stauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stauth/laravel-stauth
More information about stauth/laravel-stauth
Files in stauth/laravel-stauth
Package laravel-stauth
Short Description Staging server athorization package, .htaccess alternative
License MIT
Informations about the package laravel-stauth
Laravel Stauth
Staging server athorization package, alternative for .htaccess, register at stauth.io
Installation
Local and staging
If you don't want Stauth service provider to be exeuted at production environment, create StauthProtectionServiceProvider
And add it to config/app.php
below AppServiceProvider
:
Production
If you don't mind Stauth service provider being executed at production environment, or you want to protect your production env, add it directly at providers
array in config/app.php
.
Add Stauth middleware in app/Http/Kernel.php
, it is very important that StauthProtection
is above any response cache extension middleware like laravel-responsecache:
Generate access token at stauth.io and add it as a STAUTH_ACCESS_TOKEN
param in .env
file:
By default protected environment is staging
, in order to change this, add STAUTH_PROTECTED_ENV
param in .env
file:
Other
If you want to know or do more, read below.
Publish configuration
You can publish configuration and update required params in php file:
Cache
Please keep in mind that this package takes adventage of csrf_token
, therefore it is important to exclude both routes /stauth/protected
and /stauth/authorize
from any response caching engines.
All versions of laravel-stauth with dependencies
guzzlehttp/guzzle Version 6.*
hedronium/spaceless-blade Version ^2.0
symfony/psr-http-message-bridge Version ~1.0