我正在尝试为我的flaskrestapi实现基于令牌的身份验证。我正在使用Stormpath作为我的第三方身份验证服务。在
我研究了建立在flask-login
之上的flask-stormpath
。看起来它使用了基于密码的身份验证,因为他们试图在服务器上维护会话。另外,文件也没有给我提供足够的信息。在
我们是否为基于stormpath令牌的身份验证提供了烧瓶集成? 如果是,有人能给我指一个示例代码吗。在
我已经看过github上的stormpath/flask-stormpath-sample
,它再次在服务器中维护会话。在
参考文献:
所以我现在使用的方法是,直到rdegges将这个特性构建到
flask-stormpath
中。在您需要stormpath python sdk的最新版本和func tools的包装。在
您可以这样创建应用程序。在
^{pr2}$这个装饰器将帮助您保护端点。在
如果有人想知道代币发行和刷新的终点,请在评论中告诉我。在
我是Flask Stormpath图书馆的作者。答案是否定的。我实际上正在开发一个新版本的库(大约一个月后发布),默认情况下它将提供此功能,但现在它只支持基于会话的身份验证。在
相关问题 更多 >
编程相关推荐