I haven't no idea. How to configure it. Please help me? On Sat, May 14, 2011 at 8:28 AM, Zolzaya Erdenebaatar <zolzaya...@gmail.com>wrote:
> Thank you Tim Nagel. But I get still get error. Can you edit my config file > please? > > > On Sat, May 14, 2011 at 8:20 AM, Tim Nagel <t...@nagel.com.au> wrote: > >> Sorry missed it - You must have security enabled for the login form as >> well (security:false is not suitable). >> >> >> t >> >> >> On Sat, May 14, 2011 at 10:20, Tim Nagel <t...@nagel.com.au> wrote: >> > Your login path must be accessable to anonymous users. >> > >> > - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } >> > - { path: ^/login_check$, role: IS_AUTHENTICATED_ANONYMOUSLY } >> > # for the case of a failed login >> > >> > >> > t >> > >> > On Sat, May 14, 2011 at 10:08, Zolzaya Erdenebaatar >> > <zolzaya...@gmail.com> wrote: >> >> Hi guys, >> >> I'm trying to use FOS/UserBundle. I'm done installation and when go >> >> to http://app/web/app_dev.php/login I get following error: >> >> The webpage at http://app/web/app_dev.php/login has resulted in too >> many >> >> redirects. Clearing your cookies for this site or allowing third-party >> >> cookies may fix the problem. If not, it is possibly a server >> configuration >> >> issue and not a problem with your computer. >> >> >> >> Here is the my security.yml file: >> >> security: >> >> encoders: >> >> Symfony\Component\Security\Core\User\User: plaintext >> >> role_hierarchy: >> >> ROLE_ADMIN: ROLE_USER >> >> ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, >> ROLE_ALLOWED_TO_SWITCH] >> >> providers: >> >> fos_userbundle: >> >> id: fos_user.user_manager >> >> in_memory: >> >> users: >> >> user: { password: userpass, roles: [ 'ROLE_USER' ] } >> >> admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] } >> >> firewalls: >> >> main: >> >> form_login: >> >> provider: fos_userbundle >> >> profiler: >> >> pattern: ^/_profiler >> >> security: false >> >> wdt: >> >> pattern: ^/_wdt >> >> security: false >> >> login: >> >> pattern: ^/demo/secured/login$ >> >> security: false >> >> secured_area: >> >> pattern: ^/demo/secured/ >> >> form_login: >> >> check_path: /demo/secured/login_check >> >> login_path: /demo/secured/login >> >> logout: >> >> path: /demo/secured/logout >> >> target: /demo/ >> >> #anonymous: ~ >> >> #http_basic: >> >> # realm: "Secured Demo Area" >> >> access_control: >> >> #- { path: /login, roles: IS_AUTHENTICATED_ANONYMOUSLY, >> >> requires_channel: https } >> >> >> >> Here is the my config.yml file: >> >> imports: >> >> - { resource: parameters.ini } >> >> - { resource: security.yml } >> >> framework: >> >> secret: %secret% >> >> charset: UTF-8 >> >> error_handler: null >> >> csrf_protection: >> >> enabled: true >> >> router: { resource: "%kernel.root_dir%/config/routing.yml" } >> >> validation: { enabled: true, annotations: true } >> >> templating: { engines: ['twig'] } #assets_version: >> SomeVersionScheme >> >> session: >> >> default_locale: %locale% >> >> lifetime: 3600 >> >> auto_start: true >> >> # Twig Configuration >> >> twig: >> >> debug: %kernel.debug% >> >> strict_variables: %kernel.debug% >> >> # Assetic Configuration >> >> assetic: >> >> debug: %kernel.debug% >> >> use_controller: false >> >> filters: >> >> cssrewrite: ~ >> >> # closure: >> >> # jar: %kernel.root_dir%/java/compiler.jar >> >> # yui_css: >> >> # jar: %kernel.root_dir%/java/yuicompressor-2.4.2.jar >> >> fos_user: >> >> db_driver: orm >> >> firewall_name: main >> >> class: >> >> model: >> >> user: PR\SecurityBundle\Entity\User >> >> # Doctrine Configuration >> >> doctrine: >> >> dbal: >> >> driver: %database_driver% >> >> host: %database_host% >> >> dbname: %database_name% >> >> user: %database_user% >> >> password: %database_password% >> >> orm: >> >> auto_generate_proxy_classes: %kernel.debug% >> >> default_entity_manager: default >> >> entity_managers: >> >> default: >> >> mappings: >> >> FOSUserBundle: ~ >> >> AppSecurityBundle: { type: annotation, dir: Entity/ >> } >> >> >> >> # Swiftmailer Configuration >> >> swiftmailer: >> >> transport: %mailer_transport% >> >> host: %mailer_host% >> >> username: %mailer_user% >> >> password: %mailer_password% >> >> jms_security_extra: >> >> secure_controllers: true >> >> secure_all_services: false >> >> >> >> and my route.yml file: >> >> fos_user_security: >> >> resource: "@FOSUserBundle/Resources/config/routing/security.xml" >> >> fos_user_user: >> >> resource: "@FOSUserBundle/Resources/config/routing/user.xml" >> >> prefix: /user >> >> Please help me? I don't know what's going on here. Please help me? >> >> >> >> -- >> >> If you want to report a vulnerability issue on symfony, please send it >> to >> >> security at symfony-project.com >> >> >> >> You received this message because you are subscribed to the Google >> >> Groups "symfony users" group. >> >> To post to this group, send email to symfony-users@googlegroups.com >> >> To unsubscribe from this group, send email to >> >> symfony-users+unsubscr...@googlegroups.com >> >> For more options, visit this group at >> >> http://groups.google.com/group/symfony-users?hl=en >> >> >> > >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en >> > > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en