简体   繁体   English

使用Node.js的安全API

[英]Secure APIs using Node.js

I want to write REST API using Node.js. 我想使用Node.js编写REST API。

Part of my API needs additional security, It cannot be called directly from the browser or any other client. 我的API的一部分需要额外的安全性,无法直接从浏览器或任何其他客户端调用。 The client needs to send some authentication data along with the request. 客户端需要与请求一起发送一些身份验证数据。 The Node.js server has to process the request and send response if the request is valid. Node.js服务器必须处理请求并在请求有效时发送响应。

Do I want to look for OAuth libraries or is there any other libraries simpler than OAuth? 我要查找OAuth库还是有其他比OAuth更简单的库?

Thanks, 谢谢,

A simple OAuth can be found here: https://github.com/jaredhanson/oauth2orize . 一个简单的OAuth可以在这里找到: https : //github.com/jaredhanson/oauth2orize However I have no experience with this particular module. 但是我没有这个特定模块的经验。

您可以使用http://passportjs.org/,因为它允许您使用很多登录选项...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM