REST API Authentication

前端 未结 5 854
旧时难觅i
旧时难觅i 2020-11-28 00:20

I\'m building an application which will be hosted on a server. I want to build an API for the application to facilitate interaction with from any platform (Web App, Mobile A

5条回答
  •  清歌不尽
    2020-11-28 00:52

    You can use HTTP Basic or Digest Authentication. You can securely authenticate users using SSL on the top of it, however, it slows down the API a little bit.

    • Basic authentication - uses Base64 encoding on username and password
    • Digest authentication - hashes the username and password before sending them over the network.

    OAuth is the best it can get. The advantages oAuth gives is a revokable or expirable token. Refer following on how to implement: Working Link from comments: https://www.ida.liu.se/~TDP024/labs/hmacarticle.pdf

提交回复
热议问题