From ef5e8ec8bd2cf06cdc48b7d77ec9a85b370b4433 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 9 Apr 2018 09:10:48 +0200 Subject: feat(handlers): Add RequireLogin middleware Adds a middleware that automatically redirects users to the login page if they don't have an active session (i.e. 'author' set). --- src/oidc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/oidc.rs') diff --git a/src/oidc.rs b/src/oidc.rs index bd2044ce5c9b..09f7f7b6e354 100644 --- a/src/oidc.rs +++ b/src/oidc.rs @@ -42,7 +42,7 @@ pub struct CodeResponse { /// This struct represents the data extracted from the ID token and /// stored in the user's session. -#[derive(Debug)] +#[derive(Debug, Serialize, Deserialize)] pub struct Author { pub name: String, pub email: String, -- cgit 1.4.1