OAuth token security

空扰寡人 提交于 2019-12-06 23:56:42

问题


As far as I know, the OAuth standard is very lax on how OAuth really should behave, but...

I store OAuth access tokens for various OAuth services in a database. If these tokens were compromised, could they be used by a third party? I.e., are the given tokens bound to only my api and secret keys?


回答1:


The tokens are tied to a given service and user. With those, one can pretend to be that user. It is not tied to any IP address or device UUID for example (although one could do that as an additional precaution, but that is not part of OAuth).

If they were compromised, you'd deauthorize them, thus making them worthless.

could they be used with different API and secret keys?

No. The access token are also tied to the application they were issued for.

This way the user can de-authorize on a by-application basis, and every app can have a different set of permissions (e.g. read-only access).



来源:https://stackoverflow.com/questions/7105364/oauth-token-security

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!