Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Flask-HTAuth 0.1.2

    Download button

    No screenshots available
    Downloads: 65  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Tomasz Wojcik | More programs
    MIT/X Consortium Lic... / FREE
    September 17th, 2012, 12:40 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Flask-HTAuth description

    Integrate basic HTTP authentication for Flask apps

    Flask-HTAuth is a Python module the integrates basic HTTP authentication into Flask.

    Installation

    pip install flask-htauth

    or from GitHub:

    git clone https://github.com/tomekwojcik/flask-htauth.git
    cd flask-htauth
    python setup.py develop


    Example app

    from flask import Flask, g
    from flask.ext import htauth
    import os

    HTPASSWD = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'htpasswd')

    app = Flask(__name__)
    app.config['HTAUTH_HTPASSWD_PATH'] = HTPASSWD
    app.config['HTAUTH_REALM'] = 'Top Secret Area'

    auth = htauth.HTAuth(app)

    @app.route('/')
    def app_index():
     return 'Hello, World!'

    @app.route('/secret')
    @htauth.authenticated
    def app_secret():
     return 'Hello, ' + g.htauth_user + '!'



    Product's homepage

    Here are some key features of "Flask-HTAuth":

    · Basic auth,
    · Support for MD5, SHA and crypt htpasswd password encrypting.

    Requirements:

    · Python

      


    TAGS:

    HTTP authentication | Flask extension | Python library | Python | Flask | HTTP

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM