【发布时间】:2016-12-11 06:59:40
【问题描述】:
使用Flask-Stormpath 点子。这是设置
app.config['STORMPATH_APPLICATION'] = my_app_name
我在docs 中没有看到任何STORMPATH_DIRECTORY 设置以允许开发人员将applicationA 与多个目录一起使用。
编辑:
对于登录,我提取了 authenticate_password 方法
我可以通过兰德尔所说的具体导演
authenticate_password(username, password, account_store=self.directory)
对于用户注册,我似乎找不到解决方案
这就是我在我的一个应用程序中注册的方式:
authenticate_password(用户名、密码、account_store=self.directory)
from flask.ext.stormpath import User as StormpathUser
data = {
'email': self._api_user_name_to_email(username),
'password': password,
'given_name': username,
'surname': username,
}
StormpathUser.create(**data)
知道如何在特定目录中显式注册用户吗?
【问题讨论】: