// authTest tests to see if use has active session
authTest tests to see if use has active session
// authTest tests to see if use has active session
func (s *Srv) authTest(w http.ResponseWriter, r *http.Request) {
	token, err := utils.ParseCookie(r)
	if err != nil {
		log.Print(err)
		w.Header().Set("Content-Type", "application/json")
		json.NewEncoder(w).Encode("Unable to authenticate user.")
		return
	}
	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode("You are authenticated as: " + s.cache[token])
	return
}
func ( s * Srv ) authTest ( w http . ResponseWriter , r * http . Request ) { token , err := utils . ParseCookie ( r ) if err != nil { log . Print ( err ) w . Header ( ) . Set ( " " , " " ) json . NewEncoder ( w ) . Encode ( " " ) return } w . Header ( ) . Set ( " " , " " ) json . NewEncoder ( w ) . Encode ( " " + s . cache [ token ] ) return }
authTest tests to see if use has active session
authTest tests to see if use has active session