AscendingCreations / AxumSession

Axum Session Management Libraries that use Sqlx
MIT License
148 stars 33 forks source link

support rest mode and cookie mode at the same time #73

Open dvc94ch opened 10 months ago

dvc94ch commented 10 months ago

I have a web interface and would like to add a cli tool too. Currently the user registers or signs in and gets a cookie. I would like to add a page create api token which creates a permanent until revoked session id and support using rest mode with these tokens. Is this a common use case or is it already possible?

genusistimelord commented 10 months ago

currently we do support rest Header tokens in the latest version. But we don't not support rest header tokens and Cookies at the same time currently. Also we do not support Forever Session Tokens at this time either.We never added them since they can be a security risk. instead its probably more advisable to set the Sessions to a set time frame and upon a renewal time to renew the ID. this would enhance Security upon the Server side. just its more inconvenient to the API users.It however is more worth thinking about this style to enforce a relogin via API to get new Session Tokens ever once in a while and have the end user of the API keep track of these Tokens and the timing.

Other than that if it is something needed Feel free to request it OR make a PR to add this.