Building API - safe way to send password

2019-05-20 21:28发布

I'm building a REST API and I am in doubt about the way the password's sent is safe?

The password is sent in the URL like this:

https://www.example.com/api-version/user-name/password/

2条回答
beautiful°
2楼-- · 2019-05-20 21:53

Yeah. Don't do that. Either use HTTP Basic authentication, or pass an access token such as an OAuth token as a parameter, i.e.

http://www.example.com/api-version/end-point/?access_token=...

查看更多
Root(大扎)
3楼-- · 2019-05-20 22:12

Send it in POST payload (not in URL!) over SSL encrypted connection. Sending password as you suggested is extremely insecure.

查看更多
登录 后发表回答