Re: [Mojolicious] Using Mojolicious::Sessions for Non-Session Cookies

2019-02-06 Thread Viktor Nacht
Thank you, Stefan. That was really helpful and educational seeing the interplay 
between the module, helpers and hooks. I’m looking at it trying to wrap my head 
around an idea for a “Mojo::MagicCookie” that would allow you to deploy 
multiple session-like cookies without duplicating the all of the components. 
Not sure I can pull it off,  but this is a great example, thank you.

V

> On Feb 4, 2019, at 12:10, Stefan Adams  > wrote:
> 
> Build a MyCookie module that works like Mojolicious::Sessions 
> , and a helper 
> "mycookie" that does what "session" does 
> ,
>  but using MyCookie.
> 
> Here's my prototype attempt 
>  at it.  I 
> think it should be crafted as a plugin and of course you'll want to modify 
> the logic so that it behaves as you intend.  But the prototype, at least, 
> demonstrates how it could be done completely independently from Mojo's 
> session cookie.
> 
> On Fri, Feb 1, 2019 at 5:04 PM Viktor Nacht  > wrote:
> I really love the "it just works" interface of Mojo's session cookie, and I 
> was disappointed that I can't use that same kind of approach to other 
> cookies. I wrote a helper to de/serialize my non-session cookies 
> automatically, but that's still a step away from the amazing awesomeness of 
> sessions. Is there a way I haven't thought of yet to use a 
> Mojolicious::Sessions object for a non-session cookie that won't interfere 
> with the normal sessions' expiration and values, etc? 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to mojolicious+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to mojolicious@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/mojolicious 
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Mojolicious" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/mojolicious/bNZfaboWF6U/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> mojolicious+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to mojolicious@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/mojolicious 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Using Mojolicious::Sessions for Non-Session Cookies

2019-02-04 Thread Stefan Adams
Build a MyCookie module that works like Mojolicious::Sessions
, and a helper
"mycookie" that does what "session" does
,
but using MyCookie.

Here's my prototype attempt
 at it.
I think it should be crafted as a plugin and of course you'll want to
modify the logic so that it behaves as you intend.  But the prototype, at
least, demonstrates how it could be done completely independently from
Mojo's session cookie.

On Fri, Feb 1, 2019 at 5:04 PM Viktor Nacht  wrote:

> I really love the "it just works" interface of Mojo's session cookie, and
> I was disappointed that I can't use that same kind of approach to other
> cookies. I wrote a helper to de/serialize my non-session cookies
> automatically, but that's still a step away from the amazing awesomeness of
> sessions. Is there a way I haven't thought of yet to use
> a Mojolicious::Sessions object for a non-session cookie that won't
> interfere with the normal sessions' expiration and values, etc?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Using Mojolicious::Sessions for Non-Session Cookies

2019-02-01 Thread Viktor Nacht
I really love the "it just works" interface of Mojo's session cookie, and I 
was disappointed that I can't use that same kind of approach to other 
cookies. I wrote a helper to de/serialize my non-session cookies 
automatically, but that's still a step away from the amazing awesomeness of 
sessions. Is there a way I haven't thought of yet to use 
a Mojolicious::Sessions object for a non-session cookie that won't 
interfere with the normal sessions' expiration and values, etc? 

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.