On Monday, January 2, 2017 at 9:12:01 PM UTC-8, Joe wrote: > > What I would like to do is to send a user a link to a page where there is > a video. When the user clicks to play the video, he will have to submit a > password *(which I already sent him*) to watch the video. > > I don't want to use membership or any registration process, I just would > like to password protect the video, not the page. > > Is there a way to achieve this? > > Thanks very much, > > Cheers, > > Joe >
I'm not sure what the best way would be. One approach is to give the user an encrypted URL, and the password enables decryption, but there's some work needed to avoid the unencrypted URL becoming usable by anyone who's seen the browser history (or had it shared with them). Both URL signing (see <URL:http://web2py.com/books/default/chapter/29/12/components-and-plugins?search=signing#LOAD-and-Client-Server-component-communications>, before the "Trapped ..." section) and JWT (see gluon/contrib/web2py_jwt.py) are available to address that issue, but the normal use of each expects the user to be logged in. /dps -- 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/d/optout.

