问题标签 [stormpath]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
1449 浏览

node.js - Stormpath 集成,ExpressJS 'Stormpath 401Authentication with Vaild API Key is required'

尝试让stormpath在我的expressJS应用程序中工作时遇到一个特殊错误。我已经设置了一个stormpath 应用程序并获得了我生成的API 密钥。在我的console.log终端中显示我的环境 ID 和密钥,以便它们我的应用程序中运行。这apiKeyFile:条路可以很好地得到我的钥匙。我似乎无法弄清楚为什么我会得到一个ResourceError: HTTP 401, Stormpath 401 (http://www.stormpath.com/docs/quickstart/connect): Authentication with a valid API Key is required.

我对stormpath和表达还很陌生,所以任何建议都将不胜感激。谢谢!

0 投票
1 回答
380 浏览

node.js - Should I consolidate session management using Sails.js and Stormpath?

I'm investigating using Stormpath for our user Management.

I currently have a Sails.js application which uses Node.js / Express.js. Currently, session management is handled by the default Sails.js framework, which relies heavily on Express' session middleware.

Sessions are stored in a shared Redis database on production so that we can keep our multiple API servers stateless.

My question is will the two session management systems conflict and/or cause bugs? Do they have to be consolidated or can we safely keep them separate? if they have to be combined, how do you configure the middleware?

As a note we won't be storing much user data on Stormpath, we'll only be using them as a auth/token provider.

Thanks for the help!

0 投票
1 回答
130 浏览

node.js - Stormpath 如何阻止用户注册

我的 Porfolio 网站上有一个 Stormpath 应用程序,我用它来记录更新我的博客/项目列表。我想删除用户注册的能力(他们可以通过访问来完成site.com/register)。

我该怎么做呢?

如果有帮助,我会在 Node.js 和 Express.js 上运行

如果您需要更多信息,请询问。

0 投票
1 回答
234 浏览

node.js - How to allow only one user to register with Stormpath

Context: I have never work with Stormpath before and want to fully learn how to do certain stuff. To practice I'm creating my own portfolio, including the CMS.

My question is, how can I restrict the registration of accounts to a handful of specific emails using Google API (only me should be able to add and remove content from my own portfolio).

E.g. Allow ONLY example1@gmail.com and example2@gmail.com to register.

I could do it manually, but I do not want to do that. Steps I would like to follow are:

  1. Specify emails
  2. User tries to access the CMS
  3. User is prompted to login or register
  4. Only if user is in the specified list of emails, user can register using Google's API.

I do understand this is a very general question that involves several fields: Google's API, Stormpath, not to mention Express and Node, but maybe someone else solved this problem and I can see some code. Thanks.

0 投票
1 回答
372 浏览

apache - 烧瓶应用程序部署时的导入错误

在我尝试访问网站时部署 Flask 应用程序后,我从 apache 日志文件中收到此错误:

我的目录结构如下:

奇怪的是,如果我将import QueryAPI.py 更改为import Email,它不会给出任何错误,而是Email.pyQuery.py.

当我在 localhost 中运行应用程序时,它没有给出任何错误,所以我怀疑它可能是myApp.wsgi文件中的配置。

myApp.wsgi:

我也在使用stormpath,我不知道它是否与这个问题有关。

0 投票
3 回答
459 浏览

java - 使用stormpath和spring-boot检查用户是否登录

我有一个简单的 Web 应用程序,我正在使用 spring-boot 和 Storm 路径编写用户身份验证。(我实际上使用的是 spring-boot-starter-stormpath-thymeleaf)

我的控制器中有以下请求映射

这会强制用户登录以查看安全页面。它有效,但感觉不是最优雅的解决方案。有没有更好的办法?我认为应该可以使用过滤器解决方案,但我无法弄清楚。

0 投票
1 回答
389 浏览

scala - Scala / SBT - 对 PaaS 的依赖未解决(cloudControl 和 heroku)

我有一个Scala使用spray.io构建的简单应用程序。我正在使用Scala 2.11.2SBT 0.13.0。我的所有依赖项都在这里列出:

在本地构建和运行它时,一切都很好,但是当我尝试将它推送/部署到cloudControlherokuPaaS等平台时,我遇到了依赖问题:

...

...

使用sbt-dependency-graph检查我的依赖关系表明,未解决org.apache.httpcomponents:httpclient的是com.stormpath.sdk:stormpath-sdk-httpclient:1.0.RC4.2.

由于某种原因,变量${httpclient.version}在构建过程中没有得到解决——但这就是我能在这里弄清楚的全部。请帮忙!!!

0 投票
1 回答
371 浏览

facebook - 如何使用 Stormpath Facebook 集成验证 REST API

我正在设计一个与StormpathFacebook 集成的简单 REST API,并想知道什么是用户身份验证的最佳模式。目前我没有任何用于创建用户的端点,因此对我的端点的所有请求都经过身份验证,如下所示:

  1. Application获取基于我的应用程序API_IDAPI_SECRET在我的应用程序中配置的Stormpath对象
  2. Account根据每个请求中指定的 Facebook 令牌获取 Stormpath对象
  3. 基于帐户状态验证请求或拒绝

这或多或少遵循官方指南并且工作正常,因为即使用户帐户不存在,它也会在第一次向 Stormpath 获取帐户请求时创建。它是否有意义,是否足够安全?我正在寻找一些文档或最佳实践,但找不到任何东西。

我还需要获取/生成唯一的用户 ID,以便我可以与系统中的用户数据建立一些关系 - 所以另一个问题,这里最好的方法是什么:

  1. 生成一些唯一的 ID,将其与从 Stormpath 获取的用户电子邮件相关联并保存在我的系统中 - 我认为这违反了像 Stormapth 这样封装所有用户数据的服务的一些想法
  2. 执行与上述相同的操作,但将其存储在 Stormpath 帐户中customData
  3. 使用 Stormapth 用户资源 ID,可以从用户 URI 中获取

请指教。

只是为了记录,我正在使用Stormpath Java SDK并将 API 设计为移动社交应用程序的后端,因此安全性对我来说非常重要。

0 投票
0 回答
182 浏览

javascript - 端口号 使用stormpath时的Web socket

所以我有一个节点。使用 express 构建的 Node.js Web 应用程序。

在这个应用程序上,我使用 socket.io 将自定义数据传递给节点服务器,然后它应该将此数据传递给stormpath。

当我在本地对此进行测试时,它运行良好,但由于我在 Openshift 上启动了它,因此套接字不再工作。

我想我可能为套接字使用了错误的端口号?或者我只是这样做完全错了吗?先感谢您

服务器=app.js..

在以下代码中,favlist 是存储在stormpath 上的自定义数据数组作为json 对象

客户端=script.js...

索引.js..

0 投票
1 回答
75 浏览

node.js - Node.js-Express-Strompath 注册后立即没有CustomData

在使用 Express-Stormpath 模块通过 node/express 将用户注册到 Stormpath 后,我遇到了一个奇怪的错误(至少在我看来)。

刚注册后,我似乎无法在第一个用户会话的各种路线中访问 c​​ustomData。在注册时,我正在为发票创建和排列

但是当我在我的索引路径中访问它们时,我得到了这个错误

如果我杀死我的本地并重新启动它,我会怎么做

这就是我想要的。

谁能阐明我在这里做错了什么?

提前谢谢。