# What modules are using the query term "token" for access control?

**URL:** <https://www.ruby-forum.com/t/what-modules-are-using-the-query-term-token-for-access-control/243881>\
**Category:** NGINX\
**Created:** [January 21, 2016, 7:17pm UTC](https://www.ruby-forum.com/t/what-modules-are-using-the-query-term-token-for-access-control/243881 "2016-01-21T19:17:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [January 21, 2016, 7:17pm UTC](https://www.ruby-forum.com/t/what-modules-are-using-the-query-term-token-for-access-control/243881/1 "2016-01-21T19:17:14Z")

</div>

I have seen that couple media sites are using the “token” query term for  
access control to some media content and I was wondering what module can  
do that?  
For examples the request:  
[http://example.com/media/111111.mp4?token=xyz\_very\_long\_token](http://example.com/media/111111.mp4?token=xyz_very_long_token)

allows access to only this 111111.mp4 specific file and not to  
111112.mp4 .

I can write a web application that does the same thing but was wondering  
what might be used if there are couple web servers and couple content  
servers. In this specific case the token should be either shared between  
the servers or that the token has some encrypted data in it.  
Are there any modules that implements this function?

Thanks,  
Eliezer

---

<div class="post-metadata">

**Author:** ![elico](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@elico](https://www.ruby-forum.com/u/elico)\
**Post date:** [January 21, 2016, 11:54pm UTC](https://www.ruby-forum.com/t/what-modules-are-using-the-query-term-token-for-access-control/243881/2 "2016-01-21T23:54:44Z")

</div>

On 21/01/2016 20:38, nanaya wrote:

> Something like this?  
> [Module ngx\_http\_secure\_link\_module](http://nginx.org/en/docs/http/ngx_http_secure_link_module.html)

No.  
The idea is that a client have the full url to the resource but it will  
be restricted using a token.  
The token can be either stored in a DB such as memcached\redis or  
another option.

If such a thing doesn’t exist I would probably write something up (not  
for nginx)

Thanks,  
Eliezer

---

<div class="post-metadata">

**Author:** ![elico](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@elico](https://www.ruby-forum.com/u/elico)\
**Post date:** [January 21, 2016, 7:38pm UTC](https://www.ruby-forum.com/t/what-modules-are-using-the-query-term-token-for-access-control/243881/3 "2016-01-21T19:38:51Z")

</div>

Hi,

On Fri, Jan 22, 2016, at 03:16, Eliezer C. wrote:

> what might be used if there are couple web servers and couple content  
> servers. In this specific case the token should be either shared between  
> the servers or that the token has some encrypted data in it.  
> Are there any modules that implements this function?

Something like this?

> **[Module ngx\_http\_secure\_link\_module](http://nginx.org/en/docs/http/ngx_http_secure_link_module.html)**

---

<div class="post-metadata">

**Author:** ![elico](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@elico](https://www.ruby-forum.com/u/elico)\
**Post date:** [January 23, 2016, 11:21pm UTC](https://www.ruby-forum.com/t/what-modules-are-using-the-query-term-token-for-access-control/243881/4 "2016-01-23T23:21:26Z")

</div>

I wanted to mention a nice video about tokens in apis.

[![](https://img.youtube.com/vi/xgkNe6R4Un0/maxresdefault.jpg "Token-Based Architecture Design") ](https://www.youtube.com/watch?v=xgkNe6R4Un0)

Eliezer
