Conversation
Introduce a services module containing ApplicationService which wraps a SecurityEventServiceImpl parameterized over Postgres repo type aliases. Add a seawatch module that implements SecurityEventService for ApplicationService by delegating fetch_events to the inner service. Export both modules from application mod.
Implement CredentialServiceImpl with get_credentials and delete_credential (realm lookup, policy checks, repository calls). Add PostgresCredentialRepository type and wire credential_service into ApplicationService. Expose application::credential and implement CredentialService for ApplicationService. Add TODO webhook notifier in delete flow.
Add ClientServiceImpl providing client, redirect-uri and role management with policy checks, webhook notifications and security event recording. Add application-level client adapter (app/client) that delegates ClientService to ApplicationService and wire required repositories and types into the services setup.
LeadcodeDev
approved these changes
Nov 25, 2025
Change create_service to build and return ApplicationService. Wrap repositories and shared FerriskeyPolicy in Arc and pass cloned Arcs into service implementations. Add new(...) constructors for many domain services to accept Arc dependencies. Update RandBytesRecoveryCodeRepository to take an Arc<HasherRepository> Add Arc constructors and application builder
Remove the monolithic Service generic and its wide impl blocks across domains. Introduce concrete *Impl structs (CoreServiceImpl, AuthServiceImpl, ClientServiceImpl, etc.), move GenerateTokenInput into authentication value_objects, simplify imports/type parameters, and delete now-unused modules (authenticate.rs, grant_type_service.rs) and the FerrisKeyService alias.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.