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

Question: how does AuthenticatorService tracks per user signin info ? #12

Open
nkmittal opened this issue Sep 22, 2017 · 0 comments
Open

Comments

@nkmittal
Copy link

I am using this repo for authentication. Here is my understanding before I describe my question:

  1. By default it is using stateless Cookie approach where the Cookie is not stored at the server.
  2. When client sends the request with the Cookie then in Auth.scala the Cookie is validated using AuthenticatorService.
  3. On signOut the authenticator is discarded.

My question:
Where is the object for AuthenticatorService for each user stored ? I don't see any storage defined anywhere for this.
Refer these two code snippets:
Inside method Auth.scala:authenticate

for {
                authenticator <- env.authenticatorService.create(loginInfo).map(authenticatorWithRememberMe(_, rememberMe))
                cookie <- env.authenticatorService.init(authenticator)
                result <- env.authenticatorService.embed(cookie, Redirect(targetUri).withSession(request.session - "ENTRY_URI"))

Inside method Auth.scala:signOut
env.authenticatorService.discard(request.authenticator, Redirect(routes.Application.index))

Thanks.
Nikhil

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

1 participant