ScopeSet returns the scopes combined with the database allow list. It is the canonical way to expose an API key's effective scope for authorization.
()
| 354 | // ScopeSet returns the scopes combined with the database allow list. It is the |
| 355 | // canonical way to expose an API key's effective scope for authorization. |
| 356 | func (k APIKey) ScopeSet() APIKeyScopeSet { |
| 357 | return APIKeyScopeSet{ |
| 358 | Scopes: k.Scopes, |
| 359 | AllowList: k.AllowList, |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | func (k APIKey) RBACObject() rbac.Object { |
| 364 | return rbac.ResourceApiKey.WithIDString(k.ID). |
no outgoing calls