In this case, you can implement your own AuthenticationSuccessHandler,
and AuthenticationFailureHandler. You find the interfaces in Component/
Security/Http/Authentication/.

When you have wired these handlers with the DIC, you can set them in
the configuration as follows:

security.config:
    firewalls:
        somename:
            form_login:
                success_handler: my.service.id
                failure_handler: my.service.id


Kind regards,
Johannes

On Jan 29, 9:13 pm, Michael <[email protected]> wrote:
> Is there a way to directly use the security feature to login in the
> PHP code?
>
> In my project (Latest Symfony2.0), I submit the login/registration
> using ajax when processing the data. On failure I return a string with
> the error and on success I login the user and return "true" which call
> a redirect function (in javascript). In addition to the username/
> password I have extra parameters which I need for the process.
>
> Does anyone have an idea how to do something like that?

-- 
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

Reply via email to