I'm new to symfony & LDAP. Is there any step by step tutorial or videos to integrate LDAP in symfony2?
I don't know any tutorial or video about LDAP in Symfony2 but here are 2 bundles I used in many projects:
OpenSkyLdapBundle (requires ZF2 LDAP component)
FR3DLdapBundle (integration with FOSUserBundle)
Newer versions of Symfony2 should have LDAP support already in there. If you are constrained to an older version, consider using DapsBundle, since its functionality is patterned after Symfony2's upgrade path, meaning it should be easier for you when you do upgrade your Symfony2 version.. You can learn more about on my blog at http://robertelwell.info/blog/daps-ldap-symfony2/.
FOSUserBundle is a bundle for authenticate users against a DB, if you don't want manager your users with the DB then you must do a little customizations for break the dependency in FR3DLdapBundle.
Writing your own UserManager and setting it in the configuration should be enough.
The UserManager is used for create the User instance the first time.
Related
I recently started learning symfony and was faced with the task of making authentication. For example, in Laravel, authentication is done using various packages, where login, registration, password reset, and so on are automatically generated. Are there any similar packages for symfony? Otherwise, the standard registration, which is described in the documentation for the framework, is too simple.
Symfony has documented a great tutorial on setting up authentication. Even with Laravel it is not a one command and done process. This will take a little work, reading and understanding.
https://symfony.com/doc/current/security/form_login_setup.html
This same process I use in every new Symfony application I develop.
I am migrating an old website using Symfony1 and sfGuardPlugin for authentification, to Symfony3 and I am wondering if there in an equivalent in term of features (permission groups and rights). I studied the SF3 guard, ACL and voters but I cannot find a technology or Bundle with all the SF1 plugin features.
Please check FOSUserBundle (I'd recommend version 2.0) - it's working fine with sf3:
Using Groups With FOSUserBundle
and other usefull links.
I would like to develop a CMS with ecommerce solution on Symfony 2 and Doctrine. I would like to have a Core Bundle for CMS and some other Bundles I could add based on what clients expects.
My question is how to detach Bundles? I mean there are some relations between Shop Bundles and Core Bundles. If I add them in doctrine.orm.yml files with owning side in Shop Bundle and inverse side in Core bundle, then in situation when client wants only CMS (Core Bundle) I don't want to put there Shop Bundle too. If I won't do it, then there will be an error, that Core Bundle has some foreign keys to Table that doesn't exists.
So how to handle it? Maybe database should be designed in a way that nothing from Core Bundle has connection with Shop Bundles? Only vice versa? Or there is a way of doing it with interfaces or sth else? Any ideas?
I'm using Symfony2 project,
how can i use HWIOAuthBundle to get last tweet on twitter?
Or, other bundle symfony to authentication api 1.1 of twitter?
please give me a suggestion.
I guess using the HWIOAuthBundle is not the correct choice for fetching tweets over the new API. It's main purpose is to extend the security layer, so you can implement a login system using OAuthTokens.
I recommend you the EndroidTwitterBundle. It's simple, easy and created for your exact use case.
Which are the best user manager bundles for Symfony 2 and why?
I only know FOSUserBundle.
Are there other good bundles for managing users?
(like it was sfDoctrineGuardPlugin for Symfony 1)
I need not a final, closed solution, but the pros and contras for someone to be able to choose the best bundle depending on his needs.
Firstly, i wrote an UserBundle implementation for my requirements, after i discovered FOSUserBundle and i learned best practices from it.
I think FosUserBundle is a good choice for user manager in Symfony 2. Because
Actively maintained and supported
Provides command line commands for creating new user, activating, promoting etc.
Built-in forms, controllers and views for user related actions.
Supports Doctrine, Propel, CouchDB and Mongo for persistance.
Localization, translations
Optional features like email activation
Supported by other bundles like Sonata bundles
I never worked with other UserBundle, but i highly recommend to use FOSUserBundle.