Revert "too much effort into the garbage"

This reverts commit a2e84379a9.
This commit is contained in:
bel
2024-03-10 10:41:35 -06:00
parent a2e84379a9
commit 6ae4b401b1
5 changed files with 58 additions and 128 deletions

View File

@@ -1,9 +1,8 @@
package server
import (
"net/http"
"gitea.inhome.blapointe.com/local/router"
"net/http"
)
func (s *Server) verify(w http.ResponseWriter, r *http.Request) {
@@ -14,8 +13,10 @@ func (s *Server) verify(w http.ResponseWriter, r *http.Request) {
return
}
access := r.FormValue("access")
if err := s.verifyAccess(access); err != nil {
token, ok := s.getToken(scope, access)
if !ok {
http.Error(w, "unknown access", http.StatusUnauthorized)
return
}
w.Write([]byte(token))
}