php - Handling login failure in a Symfony application -


i working on app using fosuserbundle , maintains local database of users. use case follows:

user tries login , upon login credentials authenticated

in case of success user proceeds navigate site

in case of failure above:

the credentials authenticated against single sign on service , if credentials correct, user created locally, logged in, , proceeds navigate site.

in case single sign on unsuccessful, user shown default incorrect password screen

my question in symfony add logic?

this have tried far:

  1. i have tried @ overrriding loginaction on further research read may not work dislays login form.

  2. i looked @ following stackoverflow question: overriding authentication failure handler - symfony2

  3. also read in symfony docs: http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html

i not clear whether should use approach in 2 or 3 in use case. tips or code samples highly appreciated.

i ended using hybrid approach of 2 & 3 solve problem.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -