internal/utils
Functions
pub fn get_session_id(
cookie_name: String,
req: Request(Connection),
) -> Result(SessionId, SessionError)
Get session Id from cookie
pub fn inject_session_cookie(
cookie_name cookie_name: String,
request req: Request(Connection),
value session_id: SessionId,
security security: Security,
) -> Request(Connection)
Inject a cookie into a request replacing if it already exists This will NOT be persisted between requests
pub fn is_session_expired(session: Session) -> Bool
pub fn remove_cookie(
req: Request(Connection),
name: String,
) -> Request(Connection)
Remove a cookie from a request
Remove a cookie from the request. If no cookie is found return the request unchanged.
pub fn set_session_cookie(
cookie_name: String,
response: Response(Body),
req: Request(Connection),
session: Session,
) -> Response(Body)
Add session cookie to response