I have been working on a custom authentication manager as well.
To figure out how it works I have taken a look at the existing
authentication methods (In the Security Component) as well
as the FOSFacebookBundle.
It has taken me a couple of days to finally come up with a working
solution.
The key is to create Factory that extends AbstractFactory and
implementing it's functions.
The functions should just return a string representation of the
services you use.
For example:
protected function getListenerId()
{
return 'mobile_account.security.authentication.listener';
}
Then I build a custom Listener, implementing the ListenerInterface.
Finally I build a custom AuthenticationProvider that implements the
AuthenticationProviderInterface.
The Listener will then be able to call authenticate() on you
AuthenticationProvider, which will return a new
Token (I also had to build my own token) to your Listener. This token
indicates if the user is authenticated or not.
I hope I could point you in the right direction with this, if you need
more info let me know.
Regards,
Stefan
On Jun 8, 9:46 am, robertoNR <[email protected]> wrote:
> Nobody can help me?
>
> Roberto.
>
> On May 23, 5:02 pm, robertoNR <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi to all,
> > I am new about Symfony2, I started using it about a month ago, and I
> > have never used Symfony(1).
> > I must authenticate users from ActiveDirectory so I must write my own
> > AuthenticationProvider, I guess.
> > I have already seen opensky/LdapBundle but only UserProvider is
> > provided by this bundle but, not AuthenticationProvider.
> > Has anyone somewhat basic documentation? Some examples? Some links?
>
> > Thanks,
> > Roberto.
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en