mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-15 21:08:10 -07:00
refactor code for context fallthrough
This commit is contained in:
@@ -19,7 +19,6 @@ import (
|
||||
"github.com/sot-tech/mochi/middleware"
|
||||
"github.com/sot-tech/mochi/pkg/conf"
|
||||
"github.com/sot-tech/mochi/pkg/log"
|
||||
"github.com/sot-tech/mochi/pkg/stop"
|
||||
"github.com/sot-tech/mochi/storage"
|
||||
)
|
||||
|
||||
@@ -110,13 +109,12 @@ func build(config conf.MapConfig, _ storage.PeerStorage) (h middleware.Hook, err
|
||||
return
|
||||
}
|
||||
|
||||
func (h *hook) Stop() stop.Result {
|
||||
func (h *hook) Close() error {
|
||||
logger.Debug().Msg("attempting to shutdown JWT middleware")
|
||||
c := make(stop.Channel)
|
||||
if h.jwks != nil {
|
||||
go h.jwks.EndBackground()
|
||||
h.jwks.EndBackground()
|
||||
}
|
||||
return c.Result()
|
||||
return nil
|
||||
}
|
||||
|
||||
type verifiableClaims interface {
|
||||
|
||||
Reference in New Issue
Block a user