symfony-bundle manual-authentication-bundle
        RUVENTS Manual Authentication Bundle
    
            
                
                    
                    
                    
                    
                        
                            
    
        
        
            ruvents/manual-authentication-bundle
            RUVENTS Manual Authentication Bundle
         
     
    
        
            -  Wednesday, November 22, 2017
-  by RUVENTS
-  Repository
-  3 Watchers
-  1 Stars
-  38 Installations
 
    
        
                            - PHP
-  0 Dependents
-  0 Suggesters
-  1 Forks
-  0 Open issues
-  3 Versions
-  0 % Grown
 
 
    
        
            
    
    
    
RUVENTS Manual Authentication Bundle
Configuration
# app/config/security.yml
security:
  firewalls:
    dev:
      pattern:  ^/(_(profiler|wdt)|css|images|js)/
      security: false
    main:
      # add manual auth to any firewall (it has no options)
      manual: ~
      anonymous: ~
      provider: user_entity_provider
      form_login:
        # ...
      logout:
        # ...
      remember_me:
        secret: "%secret%"
        always_remember_me: true
Authenticating a User in the controller
<?php
namespace AppBundle\Controller;
use Ruvents\ManualAuthenticationBundle\Security\AuthenticationList;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\User\UserInterface;
/**
 * @Route("/registration")
 */
class RegistrationController
{
    /**
     * @Route("")
     * @Template()
     */
    public function indexAction(AuthenticationList $authenticationList)
    {
        // registration form and etc
        /** @var UserInterface $user */
        // on form success
        // you have to create relevant Tokens
        // f.e. PostAuthenticationGuardToken for Guard auth
        $token = new UsernamePasswordToken($user, $user->getPassword(), 'main', $user->getRoles());
        $authenticationList->setToken('main', $token);
        // redirect to next page
    }
}
         
     
 
    
        
            
                                    
                        
                        
                        
                            dev-master
                            9999999-dev
                                                        
                                RUVENTS Manual Authentication Bundle
                                
                                                                     
                                    Sources
                                                                                                     
                                    Download
                                                                
                                
                                                                            MIT
                                    
                                
                                                                    The Requires
                                    
                                     
                                                                                            
                            
                                                                    
                                        
by 
                                                                                             
                                                                                                                                    Valentin Udaltsov
                                                                                    
                                    
                                
                            
                            
                                
                            
                         
                     
                                    
                        
                        
                        
                            0.1.1
                            0.1.1.0
                                                        
                                RUVENTS Manual Authentication Bundle
                                
                                                                     
                                    Sources
                                                                                                     
                                    Download
                                                                
                                
                                                                            MIT
                                    
                                
                                                                    The Requires
                                    
                                     
                                                                                            
                            
                                                                    
                                        
by 
                                                                                             
                                                                                                                                    Valentin Udaltsov
                                                                                    
                                    
                                
                            
                            
                                
                            
                         
                     
                                    
                        
                        
                        
                            0.1.0
                            0.1.0.0
                                                        
                                RUVENTS Manual Authentication Bundle
                                
                                                                     
                                    Sources
                                                                                                     
                                    Download
                                                                
                                
                                                                            MIT
                                    
                                
                                                                    The Requires
                                    
                                     
                                                                                            
                            
                                                                    
                                        
by 
                                                                                             
                                                                                                                                    Valentin Udaltsov