Remove unused dependency

This commit is contained in:
Melon 2023-11-20 07:40:17 +00:00
parent 906f693ea3
commit 0631664df4
Signed by: melon
GPG Key ID: 6C9D970C50D26A25
2 changed files with 1 additions and 3 deletions

View File

@ -1,7 +1,6 @@
package api package api
import ( import (
"crypto/subtle"
"errors" "errors"
"github.com/1f349/mjwt" "github.com/1f349/mjwt"
"github.com/1f349/mjwt/auth" "github.com/1f349/mjwt/auth"
@ -20,7 +19,6 @@ type AuthCallback func(rw http.ResponseWriter, req *http.Request, params httprou
// error message or continues to the next handler // error message or continues to the next handler
type AuthChecker struct { type AuthChecker struct {
Verify mjwt.Verifier Verify mjwt.Verifier
Aud string
} }
// Middleware is a httprouter.Handle layer to authenticate requests // Middleware is a httprouter.Handle layer to authenticate requests

View File

@ -47,7 +47,7 @@ func main() {
log.Fatalf("[Lotus] Failed to load MJWT verifier public key from file '%s': %s", filepath.Join(wd, "signer.public.pem"), err) log.Fatalf("[Lotus] Failed to load MJWT verifier public key from file '%s': %s", filepath.Join(wd, "signer.public.pem"), err)
} }
userAuth := &api.AuthChecker{Verify: verify, Aud: conf.Audience} userAuth := &api.AuthChecker{Verify: verify}
srv := api.SetupApiServer(conf.Listen, userAuth, &conf.SendMail, &conf.Imap) srv := api.SetupApiServer(conf.Listen, userAuth, &conf.SendMail, &conf.Imap)
log.Printf("[Lotus] Starting API server on: '%s'\n", srv.Addr) log.Printf("[Lotus] Starting API server on: '%s'\n", srv.Addr)
go utils.RunBackgroundHttp("Lotus", srv) go utils.RunBackgroundHttp("Lotus", srv)