- Building Serverless Python Web Services with Zappa
- Abdulwahid Abdulhaque Barguzar
- 107字
- 2021-07-16 18:16:19
Authentication
In order to develop an authentication module, we are going to use the Flask-Login extension. The Flask-Login extension provides a user session management mechanism. It handles the common tasks for managing user sessions such as logging in, logging out, and remembering the user.
To integrate Flask-Login, you need to create the instance and define some default parameters, as described in the following code snippet:
from flask_login import LoginManager
app = Flask(__name__)
login_manager = LoginManager()
login_manager.session_protection = 'strong'
login_manager.login_view = 'auth.login'
login_manager.login_message_category = "info"
login_manager.init_app(app)
We are going to create an authentication module as an auth package. An auth package will have basic scaffolding, as shown here:

推薦閱讀
- 網(wǎng)絡(luò)教育學習指導
- 物聯(lián)網(wǎng)概論(第2版)
- 網(wǎng)絡(luò)安全技術(shù)與解決方案(修訂版)
- 計算機網(wǎng)絡(luò)與通信(第2版)
- 計算機網(wǎng)絡(luò)工程實用教程(第2版)
- 企業(yè)網(wǎng)絡(luò)安全管理
- C/C++串口通信:典型應(yīng)用實例編程實踐
- 基于性能的保障理論與方法
- 新手易學:新手學淘寶開店
- Windows Server 2012 Hyper-V虛擬化管理實踐
- 語音信號處理及Blackfin DSP實現(xiàn)
- 深入理解OpenStack Neutron
- Selenium WebDriver 3 Practical Guide
- 物聯(lián)網(wǎng)與智慧農(nóng)業(yè)
- 區(qū)塊鏈社區(qū)運營手冊