diff --git a/src/daemon/auth.rs b/src/daemon/auth.rs index 3ba96fd7..a73f8af5 100644 --- a/src/daemon/auth.rs +++ b/src/daemon/auth.rs @@ -50,8 +50,12 @@ pub fn logout(id: Identity) -> HttpResponse { HttpResponse::Ok().finish() } -pub fn is_logged_in(_auth: Auth) -> HttpResponse { - HttpResponse::Ok().finish() +pub fn is_logged_in(id: Identity) -> HttpResponse { + if id.identity().is_some() { + HttpResponse::Ok().finish() + } else { + HttpResponse::Forbidden() + } } pub type UserName = String;