A
A
Alexander2014-02-08 19:00:32
Python
Alexander, 2014-02-08 19:00:32

How to implement simple authorization for Python?

There is a small Python script that returns simple HTML pages for other applications and visual data viewing.
I want to attach some simple authorization to this: enter a login password, see only authorized data, when requesting data from external applications, also pass a login password to receive authorized data.
Any advice on what to use? Python knowledge level - beginner

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
maxfox, 2014-02-09
@pythonchik

In Flask, everything is simple: flask.pocoo.org/docs/quickstart/#sessions
It's not clear what you are using (frameworks, libraries).
As already said, you can do Basic acceess authentication on the web server, see the doc for your web server.

Y
Yuri Shikanov, 2014-02-08
@dizballanze

Use Basic access authentication

K
Konstantin Dovnar, 2014-02-08
@SolidlSnake

What's the problem?
The simplest thing is to store logins, passwords (how exactly it depends on how much you want to protect yourself) and permissions in the database, the user logs into the system, and you give the result by permissions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question