Thanks for all the help.  You guys are awesome.

Jim
 On Nov 6, 2013 5:37 PM, "Niphlod" <[email protected]> wrote:

> or ....
>
> @auth.requires_login()
> def email_link_redirector():
>     if not request.args(0):
>         raise HTTP(404)
>     redirect(URL('maintenance', 'tickets', args=['edit', 'ticket',
> request.args(0)], user_signature=True))
>
> and send the ticket email with a link to this
> email_link_redirector/ticketid
>
> if you're worried that only the user receiving the mail should indeed be
> able to open the link you send, then use a precalculated hmac_key.
> Something along the lines of
>
> 'secret_of_your_choice' + id_of_the_user + '_' + int(time.time()) \ 600
>
> will even make that link expiring if too much time has passed (in the
> previous example, 600 secs)
> in that case, replace the
> if not request.args(0)
> with
> if not URL.verify(request, hmac_key=whatyouchoose) : raise HTTP(403)
>
> and generate the link to email using
> URL('email_link_redirector', args=ticketid, hmac_key=whatyouchoose)
>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/YhzviZbdwW0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to