TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What kind of authentication model do you use for your API service?

8 点作者 hussfelt将近 13 年前
Ok, so I am building yet another API.<p>This time I wanted to go through some types of authentication implementations to see which one would be simplest for our customers to implement, and which one would be more secure.<p>How do you let your API users authenticate?<p>* Creating "Apps" in your service?<p>* User based Private/Public key?<p>* Username/Password<p>* oAuth?<p>Other ideas?<p>-- EDIT: Updated linebreaks in list.

4 条评论

hussfelt将近 13 年前
Some resources if anyone is interested to read:<p><a href="http://blog.apigee.com/detail/do_you_need_api_keys_api_identity_vs._authorization/" rel="nofollow">http://blog.apigee.com/detail/do_you_need_api_keys_api_ident...</a><p>In short: <a href="http://stackoverflow.com/questions/6767813/api-keys-vs-http-authentication-vs-oauth-in-a-restful-api" rel="nofollow">http://stackoverflow.com/questions/6767813/api-keys-vs-http-...</a>
评论 #4350966 未加载
zelk将近 13 年前
I create mobile apps against a REST backend on GAE and I use just basic authentication over https for authenticating the users. I sha1 the password and compare against a sha1 value in the database. Simplest there is but maybe not as secure as other alternatives, but I have not found any big problems with this. Please tell me if I am missing something vital. Have bought a book about OAuth but have not opened it yet. :)
评论 #4356758 未加载
评论 #4349543 未加载
kuasha将近 13 年前
Have you considered 2 factor authentication? If you are concerned about security 2FA can give you more protection- - Maruf
评论 #4354288 未加载
nec将近 13 年前
oAuth, preferred for it's simplicity.
评论 #4349460 未加载