app->bind(SecurityAlertMailConfig::class, static function (): SecurityAlertMailConfig { return new SecurityAlertMailConfig( recipientEmail: new Email(Config::string('mail.security_recipient', 'security@example.com')), ); }); $this->app->bind(HmacAuthConfig::class, static function (): HmacAuthConfig { $allowDevBypass = Config::boolean('auth.hmac.allow_dev_bypass', false); $devClient = null; if (Config::has('auth.hmac.dev_client')) { /** @var array{id: string, name: string, identifier: string, secret: string} $devClientConfig */ $devClientConfig = Config::array('auth.hmac.dev_client'); $devClient = new DevClientCredentials( id: new ClientId(Uuid::fromString($devClientConfig['id'])), name: new ClientName($devClientConfig['name']), identifier: new ClientIdentifier($devClientConfig['identifier']), secret: new ClientSecret($devClientConfig['secret']), ); } return new HmacAuthConfig( allowDevBypass: $allowDevBypass, devClient: $devClient, ); }); $this->app->bind(ThrottlingConfig::class, static function (): ThrottlingConfig { return new ThrottlingConfig( webLimit: new RequestsPerMinute(Config::integer('throttles.web', 120)), apiV1Limit: new RequestsPerMinute(Config::integer('throttles.api.v1', 60)), ); }); $this->app->bind(AppConfig::class, static function (): AppConfig { return new AppConfig( name: new AppName(Config::string('app.name', 'Arcadia')), timezone: new AppTimezone(Config::string('app.timezone', 'UTC')), locale: new Locale(Config::string('app.locale', 'en')), fallbackLocale: new Locale(Config::string('app.fallback_locale', 'en')), isDebug: Config::boolean('app.debug', false), ); }); $this->app->bind(ArcadiaStorageConfig::class, static function (): ArcadiaStorageConfig { return new ArcadiaStorageConfig( cacheStore: Config::string('cache.arcadia_store', 'database'), databaseConnection: Config::string('database.arcadia_meta_model', 'arcadia'), ); }); } }