Beispiel #1
0
func VerifyToken(w http.ResponseWriter, r *http.Request) bool {
	checkRequest := &initialCheckRequest{r, make(chan *initialCheckResponse)}
	commChannel <- checkRequest
	x := <-checkRequest.responseChan
	nlog.Debugf("%+v\n", x)
	return x.authorized
}
Beispiel #2
0
func defaultWikiBaseUrl(wikiaName, wikiaLang string) *url.URL {
	u := new(url.URL)
	baseHost := "wikia.com"
	u.Scheme = "http"
	if wikiaLang != "en" && wikiaLang != "" {
		u.Host = wikiaLang + "." + wikiaName + "." + baseHost
	} else {
		u.Host = wikiaName + "." + baseHost
	}
	nlog.Debugf("+v%", u)
	return u
}
Beispiel #3
0
func waruj() {
	for r := range commChannel {
		nlog.Debugf("%+v", r.request.URL)
		r.responseChan <- &initialCheckResponse{true}
	}
}