0

In their online developer docs, Google App Engine (GAE) mentions that you can specify you app's title and cookie timeouts from inside the Admin Console.

My question is: can I do these things programmatically, and if so, how? If not, why?!?

I ask because it would be nice to be able to have different settings for each new uploaded version of my app. Thanks in advance!

IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756

2 Answers2

1

No, there is no API to set GAE session cookies expiration.

Peter Knego
  • 79,991
  • 11
  • 123
  • 154
  • Thanks @Peter Knego (+1) - I guess now I'm confused! What are these "GAE session cookies" that you speak of, and how are they different than normal cookies? What does GAE use them for and why can they only be set from the Admin Console? Thanks again! – IAmYourFaja Aug 03 '12 at 18:35
  • In order for GAE provided authentication to work, it must set a cookie to recognize requests from an authenticated user. In production it uses cookies named ACSID (or SACSID in case of https). The underlying `User` and `UserService` APIs use this cookie under the hood to identify users. – Peter Knego Aug 03 '12 at 19:49
  • The same cookies are used to track user sessions exposed via Servlet sessions api: https://developers.google.com/appengine/docs/java/config/appconfig#Enabling_Sessions – Peter Knego Aug 03 '12 at 19:51
0

You can set the cookie expiration in the response header, in code.

See this question and answer for setting cookie in header using java. HttpOnly cookies on google app engine java

Also, the cookie expiration times you can set in the admin console are 1day (default), 1week or 2weeks, so not quite sure what benefit you'd get in setting these per version.

Community
  • 1
  • 1
Rob Curtis
  • 2,245
  • 24
  • 33
  • 1
    I think OP meant GAE session cookies, that GAE handles internally. AFAIK you can only set expiration on those cookies in Admin console. – Peter Knego Aug 03 '12 at 13:44