diff --git a/auth-server/server.go b/auth-server/server.go index 373c911..ce06326 100644 --- a/auth-server/server.go +++ b/auth-server/server.go @@ -129,11 +129,6 @@ func main() { http.Redirect(writer, request, redirectURL, http.StatusSeeOther) }) - // for tests, can access only with valid token (when logged in) - http.HandleFunc("/protected", logic.ValidateToken(func(w http.ResponseWriter, r *http.Request) { - w.Write([]byte("Hello, I'm protected")) - }, srv)) - // can access only with valid token (when logged in), deletes client http.HandleFunc("/delete", logic.ValidateToken(func(w http.ResponseWriter, r *http.Request) { id := r.Header.Get("client_id") @@ -203,6 +198,11 @@ func main() { outputHTML(w, r, "static/register.html") }) + // can access only with valid token (when logged in) + http.HandleFunc("/verify", logic.ValidateToken(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + }, srv)) + log.Fatal(http.ListenAndServe(":"+strconv.Itoa(config.AuthServerPort), nil)) } diff --git a/auth-server/static/redirect.html b/auth-server/static/redirect.html deleted file mode 100644 index 8238d91..0000000 --- a/auth-server/static/redirect.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirect - - - -

If you are not redirected, click here.

- -