Giter Site home page Giter Site logo

mod-auth-token's Introduction

  This module uses token based authentication to secure downloads 
  and prevent deep-linking. 

  Have your script or servlet generate a token to authenticate the 
  download and let Apache handle the file transfer without having 
  to pipe it through a script for security.
  
  You can find downloads, daily snapshots and support information at
   http://code.google.com/p/mod-auth-token/ 

USAGE

  The token is an hex-encoded MD5 hash of the 
  secret password, relative file path and the timestamp. It is 
  encoded onto the URI as:

    <uri-prefix><token>/<timestamp-in-hex><rel-path>

  For example
  
    /protected/dee0ed6174a894113d5e8f6c98f0e92b/43eaf9c5/path/to/file.txt

  where the token is generated as 

    md5("secret" + "/path/to/file.txt" + dechex(time_now()))
  you can add in the md5 hash the ip (and not the hostname) of the client to limit by ip. If you do so, enable AuthTokenLimitByIp in the config file of apache

  with the following configuration in httpd.conf

    <Location /protected/>
      AuthTokenSecret       "secret"
      AuthTokenPrefix       /protected/
      AuthTokenTimeout      60
	    AuthTokenLimitByIp	  off
    </Location

  The actual file would be located in
  
    /protected/path/to/file.txt

CREDITS

  Implementation ideas were taken from mod_secdownload for LIGHTTPD
    - http://trac.lighttpd.net/trac/wiki/Docs%3AModSecDownload

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.