Skip to content

dunglas/SwitchUserStatelessBundle

 
 

Repository files navigation

SwitchUserStatelessBundle

Scrutinizer Code Quality Code Coverage Build Status Dependency Status SensioLabsInsight

This bundle provides impersonating feature (switch user) for API use.

Install this bundle through Composer:

composer require lafourchette/switch-user-stateless-bundle

Then, update your AppKernel.php file as following:

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
            new SwitchUserStatelessBundle\SwitchUserStatelessBundle(),
        ];

Load routing in app/config/routing.yml:

switch_user_stateless:
    resource: "@SwitchUserStatelessBundle/Controller/ProfileController.php"
    type: annotation

Finally, update your firewalls in your app/config/security.yml file as following:

security:
    firewalls:
        main:
            # ...
            stateless: true
            switch_user_stateless: true

Read the complete doc

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • PHP 97.9%
  • Gherkin 2.1%