MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / RemoveAccess

Method RemoveAccess

pkg/oauth/storage.go:290–300  ·  view source on GitHub ↗
(token string)

Source from the content-addressed store, hash-verified

288}
289
290func (s *storage) RemoveAccess(token string) error {
291 if tokenType, id, _, err := auth.SplitToken(token); err == nil {
292 if tokenType != auth.AccessToken {
293 return errNoAccessToken.New()
294 }
295 token = id
296 }
297 return s.store.Transact(s.ctx, func(ctx context.Context, st oauth_store.Interface) error {
298 return st.DeleteAccessToken(ctx, token)
299 })
300}
301
302func (s *storage) LoadRefresh(token string) (*osin.AccessData, error) {
303 tokenType, id, tokenKey, err := auth.SplitToken(token)

Callers

nothing calls this directly

Calls 4

SplitTokenFunction · 0.92
NewMethod · 0.65
TransactMethod · 0.65
DeleteAccessTokenMethod · 0.65

Tested by

no test coverage detected