2017 © Pedro Peláez
 

library symfony-stauth

Staging server athorization package, .htaccess alternative

image

stauth/symfony-stauth

Staging server athorization package, .htaccess alternative

  • Saturday, July 8, 2017
  • by lchachurski
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Symfony Stauth

Latest Stable Version License composer.lock available, (*1)

Staging server athorization package, alternative for .htaccess, register at stauth.io, (*2)

Installation

composer require stauth/symfony-stauth

Local and staging

If you don't want Stauth service provider to be exeuted at production environment, import routes in app/routing_dev.yml, (*3)

# stauth protection
stauth_protection:
    resource: "@StauthProtectionBundle/Resources/config/routing.yml"

Initialize Bundle in AppKernel.php:, (*4)


if ($this->getEnvironment() !== 'prod') { // ... $bundles[] = new Stauth\StauthProtectionBundle(); }

Production

If you don't mind Stauth service provider being executed at production environment, or you want to protect your production app, import routes in app/routing.yml, (*5)

# stauth protection
stauth_protection:
    resource: "@StauthProtectionBundle/Resources/config/routing.yml"

Initialize Bundle in AppKernel.php:, (*6)



public function registerBundles() { $bundles = array( // ... new Stauth\StauthProtectionBundle(), );

Generate access token at stauth.io and add it to parameteres.yml:, (*7)

stauth.access_token: 'eyJkkk40eXAiOiJsdvk3k43krKV1QiLCJ...'

By default protected environment is staging, in order to change this, add stauth.protected_env to parameters.yml:, (*8)

stauth.protected_env: 'local'

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., (*9)

The Versions

08/07 2017

dev-master

9999999-dev

Staging server athorization package, .htaccess alternative

  Sources   Download

MIT

The Requires

 

08/07 2017

0.0.2

0.0.2.0

Staging server athorization package, .htaccess alternative

  Sources   Download

MIT

The Requires

 

08/07 2017

0.0.1

0.0.1.0

Staging server athorization package, .htaccess alternative

  Sources   Download

MIT

The Requires