diff options
author | KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> | 2021-10-27 18:18:06 -0300 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | d2277b1f9b17e61456cd312ef54542e1cfa81a40 (patch) | |
tree | 3f7f4b6dffe95c0f9909921dd47700e733b4ee47 /session.go | |
parent | 9f8195162295d2a789462e6b13394174a5745100 (diff) |
restructuring, part 1 of many
Diffstat (limited to 'session.go')
-rw-r--r-- | session.go | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -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 "", "" -} |