Skip to main content

viewer_auth_middleware

Function viewer_auth_middleware 

Source
async fn viewer_auth_middleware(
    __arg0: State<AppState>,
    req: Request<Body>,
    next: Next,
) -> Response
Expand description

Admit a request carrying a paired device’s viewer token: its SHA-256 is compared, in constant time, with every paired device’s. Stamps the device’s last_seen_ms at most once a minute.