RESTful API 认证/安全 [英] RESTful API authentication/security

查看:28
本文介绍了RESTful API 认证/安全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 GAE python 上为我的应用程序开发 RESTful API,现在我正在尝试找出保护此 API 的最佳方法.我在这个应用上有自己的会员/身份验证机制.

I'm developing a RESTful API for my app on GAE python and right now I'm trying to figure out the best way to secure this API. I have my own member/authentication mechanism on this app.

最好的方法是什么?

  • 拥有公钥/私钥对
  • 成为 OAuth 提供商
  • HTTP 身份验证(对我来说似乎很弱)
  • 其他??

推荐答案

首先,丢弃 HTTP Auth.不建议在真正的 REST API 中使用它,因为它驻留在 cookie 中.

First, discard HTTP Auth. It is not recommended in a true REST API since it resides on cookies.

我会选择 OAuth.有一个名为 appengine_oauth_provider 的库,它可以帮助您开始实现自己的提供程序.

I would go with OAuth. There's a library called appengine_oauth_provider, which could helps you to start implementing your own provider.

这篇关于RESTful API 认证/安全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆