MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / HasScope

Method HasScope

model/api_key.go:56–63  ·  view source on GitHub ↗

HasScope checks if the API key has the required scope

(scope string)

Source from the content-addressed store, hash-verified

54
55// HasScope checks if the API key has the required scope
56func (k *APIKey) HasScope(scope string) bool {
57 for _, s := range k.Scopes {
58 if s == scope {
59 return true
60 }
61 }
62 return false
63}

Callers 1

TestAPIKey_HasScopeFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestAPIKey_HasScopeFunction · 0.76