Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Flask Restful 实现 REST API,并希望为用户添加基于会话的身份验证。目前我没有实现网络应用程序。我想知道 Flask-Login 扩展是否只能用于 Web 应用程序,还是我也可以将它们用于我的 REST 应用程序?
尽管根据定义,RESTful 服务应该是无状态的,
我会避免那个。它更“以形式为导向”。
选择 OAuth2,它是 RESTful Web 服务的事实标准。
一个很好的实现是Flask-OAuthlib,可以在 GitHub 上找到。