CreateAPIKey issues a fresh ACCOUNT-scoped API key for the user. expiresAt is the optional hard expiration; pass nil to issue a never-expiring key (the backward-compatible default). This is the account-tier convenience wrapper over CreateScopedAPIKey — the self-host default key.
(ctx context.Context, userID, name string, expiresAt *time.Time)
| 3384 | // backward-compatible default). This is the account-tier convenience wrapper |
| 3385 | // over CreateScopedAPIKey — the self-host default key. |
| 3386 | func (s *Store) CreateAPIKey(ctx context.Context, userID, name string, expiresAt *time.Time) (*APIKey, error) { |
| 3387 | return s.CreateScopedAPIKey(ctx, userID, name, ScopeAccount, "", expiresAt) |
| 3388 | } |
| 3389 | |
| 3390 | // CreateScopedAPIKey issues a fresh API key with an explicit scope (Slice 5a). |
| 3391 | // - ScopeAccount: account-wide admin; agentID must be empty; prefix e2a_acct_. |