Discussion:
WOCookie after browser restart?
Jesse Tayler
2018-09-17 15:44:54 UTC
Permalink
Hi All

I’ve tried fussing around with various arguments but for whatever reason my WOCookie always dies when the browser restarts?

WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, true);
cookie.setExpires(null);


I’ve tried various expires and timeout combinations can anyone say what it is that I’m doing wrong ?

Seems DISTANT FUTURE is a common need, so I’m confused!

thanks



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-***@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/uoh8%40ml-in.narkive.net

This email sent
Theodore Petrosky
2018-09-17 16:47:38 UTC
Permalink
Jesse,

I see that there are overloaded constructors. maybe it doesn’t like being set once it is created!


WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, null, true);
(remove the setExpires)

public WOCookie(final String name, final String value, final String path, final String domain, final NSTimestamp expires, final boolean isSecure) {
this(name, value, path, domain, expires, isSecure, false);
}

just curious if setting the expires in the constructor does anything different!
Post by Jesse Tayler
Hi All
I’ve tried fussing around with various arguments but for whatever reason my WOCookie always dies when the browser restarts?
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, true);
cookie.setExpires(null);
I’ve tried various expires and timeout combinations can anyone say what it is that I’m doing wrong ?
Seems DISTANT FUTURE is a common need, so I’m confused!
thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-***@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/uoh8%40ml-in.narkive.net

This e
Jesse Tayler
2018-09-17 16:50:01 UTC
Permalink
I think I’ve tried everything I could think of —

Do you have say, a login cookie that lasts after browser restart?

Paste in your initializer and I’ll try it —

I read something about setting the setExpires specifically to nil and tried it any number of ways.
Post by Theodore Petrosky
Jesse,
I see that there are overloaded constructors. maybe it doesn’t like being set once it is created!
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, null, true);
(remove the setExpires)
public WOCookie(final String name, final String value, final String path, final String domain, final NSTimestamp expires, final boolean isSecure) {
this(name, value, path, domain, expires, isSecure, false);
}
just curious if setting the expires in the constructor does anything different!
Post by Jesse Tayler
Hi All
I’ve tried fussing around with various arguments but for whatever reason my WOCookie always dies when the browser restarts?
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, true);
cookie.setExpires(null);
I’ve tried various expires and timeout combinations can anyone say what it is that I’m doing wrong ?
Seems DISTANT FUTURE is a common need, so I’m confused!
thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-***@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/uoh8%40ml-in.narki
Klaus Berkling
2018-09-17 18:52:51 UTC
Permalink
I think I’ve tried everything I could think of —
Do you have say, a login cookie that lasts after browser restart?
This is mine.

WOCookie cookie = new WOCookie(userGUIDCookieKey, guid, "/", null, 2592000, false);

I recall having an issue with setting it to secure. I think -1 didn’t work but it’s been a long time.
Paste in your initializer and I’ll try it —
I read something about setting the setExpires specifically to nil and tried it any number of ways.
Post by Theodore Petrosky
Jesse,
I see that there are overloaded constructors. maybe it doesn’t like being set once it is created!
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, null, true);
(remove the setExpires)
public WOCookie(final String name, final String value, final String path, final String domain, final NSTimestamp expires, final boolean isSecure) {
this(name, value, path, domain, expires, isSecure, false);
}
just curious if setting the expires in the constructor does anything different!
Post by Jesse Tayler
Hi All
I’ve tried fussing around with various arguments but for whatever reason my WOCookie always dies when the browser restarts?
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, true);
cookie.setExpires(null);
I’ve tried various expires and timeout combinations can anyone say what it is that I’m doing wrong ?
Seems DISTANT FUTURE is a common need, so I’m confused!
thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com <https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us <https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us>
Jesse Tayler
2018-09-19 14:12:38 UTC
Permalink
Klaus!

You’ve done it — ok, I guess somehow I did NOT try that
sigh


Well, thanks - that seems to do the trick
Post by Klaus Berkling
I think I’ve tried everything I could think of —
Do you have say, a login cookie that lasts after browser restart?
This is mine.
WOCookie cookie = new WOCookie(userGUIDCookieKey, guid, "/", null, 2592000, false);
I recall having an issue with setting it to secure. I think -1 didn’t work but it’s been a long time.
Paste in your initializer and I’ll try it —
I read something about setting the setExpires specifically to nil and tried it any number of ways.
Post by Theodore Petrosky
Jesse,
I see that there are overloaded constructors. maybe it doesn’t like being set once it is created!
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, null, true);
(remove the setExpires)
public WOCookie(final String name, final String value, final String path, final String domain, final NSTimestamp expires, final boolean isSecure) {
this(name, value, path, domain, expires, isSecure, false);
}
just curious if setting the expires in the constructor does anything different!
Post by Jesse Tayler
Hi All
I’ve tried fussing around with various arguments but for whatever reason my WOCookie always dies when the browser restarts?
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, true);
cookie.setExpires(null);
I’ve tried various expires and timeout combinations can anyone say what it is that I’m doing wrong ?
Seems DISTANT FUTURE is a common need, so I’m confused!
thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com <https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us <https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com <https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com>
Klaus Berkling
2018-09-19 14:21:26 UTC
Permalink
Post by Jesse Tayler
Klaus!
You’ve done it — ok, I guess somehow I did NOT try that
sigh

Well, thanks - that seems to do the trick
Nice, glad that worked. Did you set secure to true? Or was it the -1?
Post by Jesse Tayler
Post by Klaus Berkling
I think I’ve tried everything I could think of —
Do you have say, a login cookie that lasts after browser restart?
This is mine.
WOCookie cookie = new WOCookie(userGUIDCookieKey, guid, "/", null, 2592000, false);
I recall having an issue with setting it to secure. I think -1 didn’t work but it’s been a long time.
Paste in your initializer and I’ll try it —
I read something about setting the setExpires specifically to nil and tried it any number of ways.
Post by Theodore Petrosky
Jesse,
I see that there are overloaded constructors. maybe it doesn’t like being set once it is created!
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, null, true);
(remove the setExpires)
public WOCookie(final String name, final String value, final String path, final String domain, final NSTimestamp expires, final boolean isSecure) {
this(name, value, path, domain, expires, isSecure, false);
}
just curious if setting the expires in the constructor does anything different!
Post by Jesse Tayler
Hi All
I’ve tried fussing around with various arguments but for whatever reason my WOCookie always dies when the browser restarts?
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, true);
cookie.setExpires(null);
I’ve tried various expires and timeout combinations can anyone say what it is that I’m doing wrong ?
Seems DISTANT FUTURE is a common need, so I’m confused!
thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
Jesse Tayler
2018-09-19 14:24:43 UTC
Permalink
I just used what you threw me and right off it just worked as planned.

Basically the test is to log in locally, quite browser and return and if you’re still logged in? Then it worked.

Maybe we should make note in the wiki pages?

There was very little about WOCookie, but a simple listing of a line that works could help I’d imagine

Post by Klaus Berkling
Post by Jesse Tayler
Klaus!
You’ve done it — ok, I guess somehow I did NOT try that
sigh

Well, thanks - that seems to do the trick
Nice, glad that worked. Did you set secure to true? Or was it the -1?
Post by Jesse Tayler
Post by Klaus Berkling
I think I’ve tried everything I could think of —
Do you have say, a login cookie that lasts after browser restart?
This is mine.
WOCookie cookie = new WOCookie(userGUIDCookieKey, guid, "/", null, 2592000, false);
I recall having an issue with setting it to secure. I think -1 didn’t work but it’s been a long time.
Paste in your initializer and I’ll try it —
I read something about setting the setExpires specifically to nil and tried it any number of ways.
Post by Theodore Petrosky
Jesse,
I see that there are overloaded constructors. maybe it doesn’t like being set once it is created!
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, null, true);
(remove the setExpires)
public WOCookie(final String name, final String value, final String path, final String domain, final NSTimestamp expires, final boolean isSecure) {
this(name, value, path, domain, expires, isSecure, false);
}
just curious if setting the expires in the constructor does anything different!
Post by Jesse Tayler
Hi All
I’ve tried fussing around with various arguments but for whatever reason my WOCookie always dies when the browser restarts?
WOCookie cookie = new WOCookie(“USER_ID", userIdentifierCode, "/", null, -1, true);
cookie.setExpires(null);
I’ve tried various expires and timeout combinations can anyone say what it is that I’m doing wrong ?
Seems DISTANT FUTURE is a common need, so I’m confused!
thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com <https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us <https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com <https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com>
Paul Hoadley
2018-09-19 23:20:06 UTC
Permalink
Post by Jesse Tayler
Maybe we should make note in the wiki pages?
There was very little about WOCookie, but a simple listing of a line that works could help I’d imagine

Definitely. Do it.
--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/
Loading...