AuthRepository constructor
- required AuthService authService,
- required Fresh<
AuthTokenModel> fresh, - required SecureStorage secureStorage,
- required UserRepository userRepository,
- required AuthFailureNotifier authFailureNotifier,
- required ToastService toastService,
- required AppLogger logger,
Creates an AuthRepository and subscribes to auth-failure notifications.
Implementation
AuthRepository({
required AuthService authService,
required Fresh<AuthTokenModel> fresh,
required SecureStorage secureStorage,
required UserRepository userRepository,
required AuthFailureNotifier authFailureNotifier,
required ToastService toastService,
required AppLogger logger,
}) : _authService = authService,
_fresh = fresh,
_secureStorage = secureStorage,
_userRepository = userRepository,
_authFailureNotifier = authFailureNotifier,
_toastService = toastService,
_logger = logger {
_subscribeToAuthFailures();
}