ZF2 Authentication via external HTTP-Request

williamroyal

New Member
I'd like to write an Authentication-Adapter with ZF2 Framework. Let's assume my website is accessible under my.site/ and the authentication shall be handled by the external site external.site/.The login procedure shall be as follows:
  • If session data is stored at my.site/, everything is fine, stay on the site.
  • If no session data is stored at my.site/, the user shall be redirected to external.site/authenticate?return_to=my.site/.
    • If the user is logged in on this external site, he will be immediately redirected to my.site/?user=john&name=John&verify=cryptic-string.
    • If the user is not logged in on this external site, he will see the login form and has to provide his credentials there. After successfully logging in to the external site, he will be redirected to my.site/?user=john&name=John&verify=cryptic-string.
    &verify=cryptic-string is used to check if the user is really logged in on the external site. If the check was successfully passed, the session data of the user is stored and the user is logged in at my.site/.
So far, I started with the ZendSkeletonApplication and ZfcUser and already have my own User-module. My question now is: What is the best way to implement the authentication described above?
  • Where to put the authentication controller?
  • What configuration files do I need?
  • Can I use BjyAuthorize?
Thanks in advance!
 
Top