#40: Add UserSessionStoreProtocol.

Only log out of the specific account.
Add tests for the keychain controller.
Expand test coverage.
PR comments
This commit is contained in:
Doug
2022-06-15 10:10:22 +01:00
committed by Doug
parent abd6a9c7c0
commit 8653f1dd6b
17 changed files with 261 additions and 78 deletions
@@ -19,7 +19,7 @@ protocol AuthenticationCoordinatorDelegate: AnyObject {
func authenticationCoordinatorDidStartLoading(_ authenticationCoordinator: AuthenticationCoordinator)
func authenticationCoordinator(_ authenticationCoordinator: AuthenticationCoordinator,
didLoginWithSession userSession: UserSession)
didLoginWithSession userSession: UserSessionProtocol)
func authenticationCoordinator(_ authenticationCoordinator: AuthenticationCoordinator,
didFailWithError error: AuthenticationCoordinatorError)
@@ -27,7 +27,7 @@ protocol AuthenticationCoordinatorDelegate: AnyObject {
class AuthenticationCoordinator: Coordinator {
private let userSessionStore: UserSessionStore
private let userSessionStore: UserSessionStoreProtocol
private let navigationRouter: NavigationRouter
private(set) var clientProxy: ClientProxyProtocol?
@@ -35,7 +35,7 @@ class AuthenticationCoordinator: Coordinator {
weak var delegate: AuthenticationCoordinatorDelegate?
init(userSessionStore: UserSessionStore,
init(userSessionStore: UserSessionStoreProtocol,
navigationRouter: NavigationRouter) {
self.userSessionStore = userSessionStore
self.navigationRouter = navigationRouter
@@ -16,13 +16,11 @@
import SwiftUI
/// Metrics used across the entire onboarding flow.
struct AuthenticationMetrics {
/// Standard constants used across the app's UI.
struct UIConstants {
static let maxContentWidth: CGFloat = 600
static let maxContentHeight: CGFloat = 750
/// The padding used between the top of the main content and the navigation bar.
static let topPaddingToNavigationBar: CGFloat = 16
/// The width/height used for the main icon shown in most of the screens.
static let iconSize: CGFloat = 90
}