HasScope checks if the API key has the required scope
(scope string)
| 54 | |
| 55 | // HasScope checks if the API key has the required scope |
| 56 | func (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 | } |
no outgoing calls