Cross-signing: Handle UserInteractiveAuthenticationService refactoring for cross signing setup.

This commit is contained in:
SBiOSoftWhare
2021-02-10 14:57:00 +01:00
parent 1e81cf3164
commit b2ffb9098e
5 changed files with 22 additions and 22 deletions
@@ -59,13 +59,13 @@ final class SecretsResetCoordinator: SecretsResetCoordinatorType {
// MARK: - Private
private func showAuthentication(with authenticationSessionParameters: AuthenticationSessionParameters) {
private func showAuthentication(with request: AuthenticatedEndpointRequest) {
let reauthenticationCoordinatorParameters = ReauthenticationCoordinatorParameters(session: self.session,
presenter: self.toPresentable(),
title: nil,
message: VectorL10n.secretsResetAuthenticationMessage,
authenticationSessionParameters: authenticationSessionParameters)
authenticatedEndpointRequest: request)
let coordinator = ReauthenticationCoordinator(parameters: reauthenticationCoordinatorParameters)
coordinator.delegate = self
@@ -77,8 +77,8 @@ final class SecretsResetCoordinator: SecretsResetCoordinatorType {
// MARK: - SecretsResetViewModelCoordinatorDelegate
extension SecretsResetCoordinator: SecretsResetViewModelCoordinatorDelegate {
func secretsResetViewModel(_ viewModel: SecretsResetViewModelType, needsToAuthenticateWith authenticationSessionParamaters: AuthenticationSessionParameters) {
self.showAuthentication(with: authenticationSessionParamaters)
func secretsResetViewModel(_ viewModel: SecretsResetViewModelType, needsToAuthenticateWith request: AuthenticatedEndpointRequest) {
self.showAuthentication(with: request)
}
func secretsResetViewModelDidResetSecrets(_ viewModel: SecretsResetViewModelType) {
@@ -96,7 +96,7 @@ final class SecretsResetViewModel: SecretsResetViewModelType {
}
private func askAuthentication() {
let authenticationSessionParameters = self.crossSigningService.setupCrossSigningAuthenticationSessionParameters()
self.coordinatorDelegate?.secretsResetViewModel(self, needsToAuthenticateWith: authenticationSessionParameters)
let setupCrossSigningRequest = self.crossSigningService.setupCrossSigningRequest()
self.coordinatorDelegate?.secretsResetViewModel(self, needsToAuthenticateWith: setupCrossSigningRequest)
}
}
@@ -23,7 +23,7 @@ protocol SecretsResetViewModelViewDelegate: class {
}
protocol SecretsResetViewModelCoordinatorDelegate: class {
func secretsResetViewModel(_ viewModel: SecretsResetViewModelType, needsToAuthenticateWith authenticationSessionParamaters: AuthenticationSessionParameters)
func secretsResetViewModel(_ viewModel: SecretsResetViewModelType, needsToAuthenticateWith request: AuthenticatedEndpointRequest)
func secretsResetViewModelDidResetSecrets(_ viewModel: SecretsResetViewModelType)
func secretsResetViewModelDidCancel(_ viewModel: SecretsResetViewModelType)
}