ZeusWPI/zauth

Separate "cookie not found" and "invalid cookie" paths.

開放

#56 建立於 2020年11月18日

 (0 則留言) (0 個反應) (0 位負責人)Rust (1 個分叉)auto 404
good first issue

倉庫指標

星標
 (9 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Now we just wrap 'cookie problems' in a CookieError but there is a distinct difference between two situations:

  • There is no cookie with a given name (the cookie was never set, or has expired). This situation is normal and would require the user to login again or restart the oauth flow. This should be a user friendly error.
  • There is a cookie, but we can't deserialize it. This is not normal and is probably a development problem, because we are the one serializing the cookie and because they are encrypted and authenticated, users are not able to tamper with them. This should be an internal server error.

The work here will have to be done in ephermeral/cookieable.rs and errors.rs.

貢獻者指南