MCPcopy Index your code
hub / github.com/bytebase/bytebase / checkTokenExpiry

Method checkTokenExpiry

backend/api/lsp/handler.go:198–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

196}
197
198func (h *Handler) checkTokenExpiry() error {
199 if !h.tokenExpiry.IsZero() && time.Now().After(h.tokenExpiry) {
200 return errors.New("access token expired, please reconnect")
201 }
202 return nil
203}
204
205func (h *Handler) checkMetadataPermissions(ctx context.Context, metadata SetMetadataCommandArguments) error {
206 user, ok := ctx.Value(common.UserContextKey).(*store.UserMessage)

Callers 1

handleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected