added rescan method to update indexes

This commit is contained in:
2025-03-23 19:01:15 -01:06
parent d022023a4c
commit cba3b3c28d
27 changed files with 596 additions and 520 deletions

View File

@@ -2,6 +2,8 @@ package httpauth
import (
"encoding/base64"
"errors"
"fmt"
"net/http"
"strings"
"time"
@@ -11,6 +13,9 @@ import (
"realy.lol/tag"
)
var ErrMissingKey = errors.New(fmt.Sprintf(
"'%s' key missing from request header", HeaderKey))
// CheckAuth verifies a received http.Request has got a valid
// authentication event or token in it, and provides the public key that should be
// verified to be authorized to access the resource associated with the request.
@@ -20,7 +25,7 @@ import (
func CheckAuth(r *http.Request, vfn VerifyJWTFunc) (valid bool, pubkey []byte, err error) {
val := r.Header.Get(HeaderKey)
if val == "" {
err = errorf.E("'%s' key missing from request header", HeaderKey)
err = ErrMissingKey
return
}
log.I.F("validating auth '%s'", val)