Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: expose logged in user in loginSucceeded #157

Open
nefilim opened this issue Oct 23, 2015 · 3 comments
Open

Feature Request: expose logged in user in loginSucceeded #157

nefilim opened this issue Oct 23, 2015 · 3 comments

Comments

@nefilim
Copy link

nefilim commented Oct 23, 2015

Is it possible to propagate the logged in user to

def loginSucceeded(request: RequestHeader)(implicit ctx: ExecutionContext): Future[Result] 

this seems like the ideal integration point for firing external events (audit logging for instance) but needs the applicable user to be useful. Or do you suggest another approach?

@nefilim nefilim changed the title Feature Request: add logged in user to loginSucceeded Feature Request: expose logged in user in loginSucceeded Oct 23, 2015
@liorhar
Copy link
Contributor

liorhar commented Nov 8, 2015

+1

@gakuzzzz
Copy link
Member

Sorry my late reply.

I agree this motivation.

However, I consider removing the loginSucceeded and logoutSuceeded method from AuthConfig in future release.

In essence, play2-auth should be only provide a Result => Result function what it call in Login action when the login is succeeded.

I think it is better that these procedure (that use User info, ex. logging) are defined in Login Action directly.

@thiloplanz
Copy link

I think I also need this in order to redirect every user to the appropriate top page (for that group of users) after login. Current workaround is to have a single controller for all that just dispatches based on group, but it would be nice to not need the extra level of indirection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants