Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8485961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:48:03+00:00 2026-06-10T20:48:03+00:00

Update1: Could you give me a short example on how to manage cookies and

  • 0

Update1:

Could you give me a short example on how to manage cookies and sessions in play2? (remember me function)

Okay I think I understand the main concept behind the play authentication.

Zentasks uses sessions. I know that sessions are only stored on the server.
And sessions in play2 are already signed. Cookies are not.

What if the users wants to be logged in even if he closes the browser?

I would need to use a cookie.

What should I do?

Do I create a cookie that creates a session?

for example

  • user has a valid cookie
  • get cookie val and create a new session

Or do I completely discard sessions and only use cookies instead. Because cookies are not signed automatically by play2 , I have to do it by myself, which I did.

response().setCookie("remember",Crypto.sign(rnd) + "-" + obj.getClass().getName() + "-" + rnd,12000);

(I know I didn’t make it secure yet with the secured and http only flag)

I just don’t want to invent a new and flawed system. I hope you can clear things up for me how to make authentication secure in play2.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:48:05+00:00Added an answer on June 10, 2026 at 8:48 pm

    This helped me a lot

    http://bazaar.launchpad.net/~opensource21/permsec/trunk/view/head:/psec/app

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our build/deploy process is very tedious, sufficiently manual and error-prone. Could you give proposals
Afternoon Folks, I was wondering if anyone could give me a heads up with
I'm looking for a hash function that I can use to give uniform unique
UPDATE AT THE BOTTOM Maybe somebody could help with this... been struggling with it
Could someone tell me why this code does not update the data response? It's
I'm trying to find the best way to update an object which could be
Updated Example: http://jsfiddle.net/7Cwbn/62/ You can click on the markers Hold Ctrl to select multiple
I have volunteered to give a one hour lunchtime briefing at my workplace to
My question is rather complex, but I thought I should give it a try.
Forgive me if I could have any sort of fundamental error here. I'd imagine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.