using InvercargillSqlInversion; using Inversion; namespace Spry { /** * Inversion module that registers Spry's user store: the `spry_users` and * `spry_user_permissions` schema (M0001 migration), the entity/projection * mappings, and the scoped {@link Spry.Authentication.UserService}. * * Register this module with the application container alongside * `StatumModule`; it registers no endpoints. Ready-made actions are bound * separately via {@link SpryAuth.register_actions} or * `StatumConfigurator.action`. */ public class SpryModule : Object, Module { public void register_components(Container container) throws Error { // Sql table setup var sql = container.configure_with(); sql.add_migration(); sql.add_entity(Authentication.UserEntity.entity_mapping); sql.add_entity(Authentication.UserPermissionEntity.entity_mapping); sql.add_projection(Authentication.UserProjection.projection_mapping); // Service setup container.register_scoped(); } } }