addApiKey method
Adds an API key with the scopes of role (token fdk_…).
Implementation
void addApiKey(String key, {String role = 'operator', String? name}) =>
_apiKeys[key] = {
'id': _keyId(key),
'name': name ?? 'key ${key.length > 12 ? key.substring(0, 12) : key}',
'role': role,
'scopes': Scopes.ofRole(role).toList()..sort(),
'prefix': 'fdk_${_keyId(key)}',
'createdAt': _now(),
};