example from when I was learning about Ruby, authentication and webmachine