Working with sessions in Iron and Hyper


#1

How can I create a simple authentication system in Rust/Iron or Hyper. For myself it’ll be good enough.

That is, I only want to:

  • write a user_id into a session

  • check if “user_id” exists in a session a cookie exists before each request

  • manually remove it when a user logs out

How can I do this?

I’m not asking for an auth. solution which already exists.


#2

It seems you got some comments on reddit: https://www.reddit.com/r/rust/comments/72gxsj/working_with_sessions_in_iron_or_hyper/


#3

It seems? You’re unsure?