package auth_middleware
import (
"net/http"
"path"
)
func TokenFromSplitCookie(r *http.Request) string {
dataCookie, err := r.Cookie("DataCookie")
if err != nil {
return ""
}
signatureCookie, err := r.Cookie("SignatureCookie")
cookie := dataCookie.Value + "." + signatureCookie.Value
return cookie
func TokenFromUrl(r *http.Request) string {
_, token := path.Split(r.URL.Path)
return token