JWT (JSON Web Token) automatic prolongation of expiration

后端 未结 12 2177
一向
一向 2020-11-22 10:56

I would like to implement JWT-based authentication to our new REST API. But since the expiration is set in the token, is it possible to automatically prolong it? I don\'t wa

12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 11:14

    Ref - Refresh Expired JWT Example

    Another alternative is that once the JWT has expired, the user/system will make a call to another url suppose /refreshtoken. Also along with this request the expired JWT should be passed. The Server will then return a new JWT which can be used by the user/system.

提交回复
热议问题