From d2277b1f9b17e61456cd312ef54542e1cfa81a40 Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Wed, 27 Oct 2021 18:18:06 -0300 Subject: restructuring, part 1 of many --- session.go | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'session.go') diff --git a/session.go b/session.go index b2af357..fd29a01 100644 --- a/session.go +++ b/session.go @@ -92,26 +92,3 @@ func GetPasswordFromSession(r *http.Request) (string, string) { return "", "" } - -func GetPasswordFromCtx(r *fiber.Ctx) (string, string) { - - c := r.Cookies("session_token") - - sessionToken := c - - response, err := cache.Do("GET", sessionToken) - - if CheckError(err, "could not get session from cache") != nil { - return "", "" - } - - token := fmt.Sprintf("%s", response) - - parts := strings.Split(token, "|") - - if len(parts) > 1 { - return parts[0], parts[1] - } - - return "", "" -} -- cgit v1.2.3