Disconnect Fr3d LDAP bundle from FOS User Bundle - symfony

I am trying to use Fr3d LDAP bundle with Symfony2 to authenticate users before entering my site.
Unfortunately, I am unable to modify the schema to form the necessary user table required by FOS User Bundle. This leads me to trying to bypass the FOS User Bundle and just use the functionality in Fr3d LDAP bundle.
Does anyone have any information on how to do this? I've looked all over and haven't found anything.

Yes, is possible use FR3DLdapBundle without FOSUserBundle.
Just change service.user_manager with your own user manager (https://github.com/Maks3w/FR3DLdapBundle/blob/2.0.x/Resources/doc/index.md)
This is the interface that you should implement https://github.com/Maks3w/FR3DLdapBundle/blob/2.0.x/Model/UserManagerInterface.php
*This is a copy of the comment Disconnect Fr3d LDAP bundle from FOS User Bundle *

Related

HWIOAuthBundle without login

I need this logic:
user login with FOS user bundle
user click on google logo (for example) and login with google+
googleId token is saved in User entity.
So there is no firewall with HWIOAuthBundle and I need to use only HWIOAuthBundle listener. Is this correct?
Thanks in advance.
v.
I think that you are looking for HWIOAuth Connect functionality so you can connect a social media account (Google) to an existing FOS user.This may help you:
https://codereviewvideos.com/blog/hwioauth-registration-form/

Symfony with FosUserBundle - 2 different login success paths

I have 2 user roles in my application: admin and member. After a successful login, an admin user must be redirected to /admin and member must be redirected to /catalog.
Is this possible with Symfony and the FOSUserBundle?
Yes, you can modify the login behaviour. It's nothing FOSUserBundle specific, it's a Symfony feature: https://symfony.com/doc/current/security/form_login.html#always-redirect-to-the-default-page
Another solution is a custom login authentication success handler. You can find an example here: https://gist.github.com/chalasr/69ad35c11e38b8cc717f

How Can I create an authenticated user from ldap

I have a login page on my symfony2 application.
That only users in an remote active directory can connect.
And I would like to create a user on my oracle database for every new user who connect on my app.
How can I handle that ?
Im using FOSUserBundle and the LDAP Component
I can't find a way to hook the login success to implement an user creation or orverride the symfony ldap core component.
Thanks for your helps

How to add a check during the login process with Symfony FOS User

my symfony app works with dynamics subdomain, and my users can login only on their subdomain.
If user George is a user of subdomain test (he has the subdomain as a field) he can login on test.myapp.com. But during the login process I would like to check his subdomain like FOS User check the password, if the account is activated ... and stop the login process if the user is not on the right subdomain.
Thanks
If you are using FOS 2.0, events are available for you to hook into and add custom logic like this. Symfony provides the Symfony\Component\Security\Http\SecurityEvents and FOS has FOS\UserBundle\FOSUserEvents. Using the onImplicitLogin should give you access to what you need.
For a nice example of linking for a FOS event, see cheesemacfly's answer.
If you have trouble, I can write the listener and the service you need.

FosUserBundle how can logged with ROLE_ADMIN or SUPERADMIN?

i have installed correctly the FOSUserBundle
but my questions are 2
for logged with a admin?
and i not understand how set some user to admin
thx
Security in Symfony2 is mainly based on user roles, so if the user has admin roles as defined in your security configuration you should have 'admin' user. Maybe you should look into the docs.
http://symfony.com/doc/current/book/security.html#roles
In case you are using SonataAdminBundle check http://sonata-project.org/bundles/admin/master/doc/reference/security.html

Resources