RESTful API Authentication

前端 未结 2 1686
南方客
南方客 2021-02-02 14:37

I have found quite a few questions on this topic on SO, but couldn\'t find any answering this question:

Should I validate users with their username and password, or with

2条回答
  •  难免孤独
    2021-02-02 14:52

    One good method is to have a login method, taking the username and password (hopefully over TLS). You give them an expiring token if they successfully auth; the rest of their API calls must contain this token to succeed.

提交回复
热议问题