User object reconstraction

New topics about Symfony 2 should go here

Moderators: dcobalt, tiagojsag

User object reconstraction

Postby ShurikAg » Sat Apr 14, 2012 2:11 am

Hi all,

We are implementing our own authentication provider that uses remote service to get user object.

In standard Symfony's implementation, user object is reconstructed and populated on every request, is it's available as a global variable (For example, in form of app.user or such).
Where is this user object gets populated? (we need to populate it differently)

Thanks,

A.
ShurikAg
Member
 
Posts: 44
Joined: Fri Sep 04, 2009 12:20 am
Location: Canada

Re: User object reconstraction

Postby blogsh » Sat Apr 14, 2012 2:17 pm

It really depends on how "deep" you want to modify the authentication system of Symfony. If you simply want to get the users objects from a remote service you can create a user provider: http://symfony.com/doc/current/cookbook ... vider.html
blogsh
Faithful Member
 
Posts: 501
Joined: Thu Mar 03, 2011 9:35 pm
Location: Germany

Re: User object reconstraction

Postby ShurikAg » Tue May 15, 2012 11:26 pm

blogsh wrote:It really depends on how "deep" you want to modify the authentication system of Symfony. If you simply want to get the users objects from a remote service you can create a user provider: http://symfony.com/doc/current/cookbook ... vider.html

Actually, custom provider is the one that creates user object on authentication (login) flow, but it's not even used in any of the subsequent requests.
As far as I could understand the user object get's serialized into a session. And, on subsequent requests get's uninitialized from the session. So, my question is where is that happening?

Thanks.
ShurikAg
Member
 
Posts: 44
Joined: Fri Sep 04, 2009 12:20 am
Location: Canada

Re: User object reconstraction

Postby ShurikAg » Wed Jun 06, 2012 12:55 am

OK, let's ask it differently:
Do I have an access to user object from a listener?
ShurikAg
Member
 
Posts: 44
Joined: Fri Sep 04, 2009 12:20 am
Location: Canada


Return to General Symfony 2 discussion

Who is online

Users browsing this forum: Google [Bot] and 4 guests