nsarno / knock

Seamless JWT authentication for Rails API
MIT License
2.07k stars 253 forks source link

Setting token lifetime according to user field #270

Open Joaquim-Ferrer opened 4 years ago

Joaquim-Ferrer commented 4 years ago

According to the docs it only seems to be possible to change the token lifetime according to the class of the model but my admins are defined by a boolean field .admin in the user.

Is it possible to define the token lifetime according to an user field?