BaseState¶
- class gafaelfawr.middleware.state.BaseState¶
Bases:
object
Base class for state information stored in a cookie.
Each application must implement this abstract base class and provide the class to the
StateMiddleware
constructor. This allows application-specific state while keeping the state middleware handling generic. The derived class must be a dataclass.Methods Summary
from_cookie
(cookie, request)Reconstruct state from an encrypted cookie.
Build an encrypted cookie representation of the state.
Methods Documentation
- abstract async classmethod from_cookie(cookie, request)¶
Reconstruct state from an encrypted cookie.