2017 © Pedro Peláez
 

symfony-bundle symfony-stack-security

A Symfony security provider for STACK compatibility.

image

reen/symfony-stack-security

A Symfony security provider for STACK compatibility.

  • Monday, January 13, 2014
  • by reenl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

A symfony security provider for STACK

This project contains a simple bundle that enables you to use STACK authentication middlewares., (*1)

Example

In order to secure the default Acme bundle with stack you have to change the secured_area within security.yml., (*2)

It should look like this:, (*3)

secured_area:
    pattern:    ^/demo/secured/
    stack_token: ~
    logout:
        path:   _demo_logout
        target: _demo
    stack_challenge: ~

Note that there are 2 stack authenticators given. stack_token searches the request for a token, when it is found it will ask the security provider (default in_memory) to find the user and store it in the security context., (*4)

The other authenticator is stack_challenge it delegates authentication to the STACK middlewares., (*5)

If you like to do a quick test you can alter app_dev.php and make it look like this to authenticate as user., (*6)

<?php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Debug\Debug;

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
Debug::enable();

require_once __DIR__.'/../app/AppKernel.php';

$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$request->attributes->set('stack.authn.token', 'user'); // This authenticates you as "user"
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

Questions?

  • irc.freenode.net: ReenL
  • Twitter: https://twitter.com/reenlokum

The Versions

13/01 2014

dev-master

9999999-dev

A Symfony security provider for STACK compatibility.

  Sources   Download

MIT

The Requires

 

13/01 2014

0.1.0

0.1.0.0

A Symfony security provider for STACK compatibility.

  Sources   Download

MIT

The Requires