merge IOS-2160
authorDirk Zimmermann <dz@pep.security>
Tue, 17 Mar 2020 15:41:39 +0100
changeset 123148014eb2c45bf
parent 12303 328087634b4b
parent 12313 0e1a161487f5
child 12315 4b206089bd71
child 12323 0b5e3c661e7c
merge IOS-2160
     1.1 --- a/pEpForiOS/Base.lproj/AccountCreation.storyboard	Tue Mar 17 11:45:23 2020 +0100
     1.2 +++ b/pEpForiOS/Base.lproj/AccountCreation.storyboard	Tue Mar 17 15:41:39 2020 +0100
     1.3 @@ -72,7 +72,6 @@
     1.4                                                              </userDefinedRuntimeAttribute>
     1.5                                                          </userDefinedRuntimeAttributes>
     1.6                                                          <connections>
     1.7 -                                                            <action selector="emailChanged:" destination="clh-8B-z2B" eventType="editingChanged" id="lyn-wg-lDp"/>
     1.8                                                              <outlet property="delegate" destination="clh-8B-z2B" id="wfT-nP-T86"/>
     1.9                                                          </connections>
    1.10                                                      </textField>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/pEpForiOS/Resources/Assets.xcassets/Providers/asset-Office365.imageset/Contents.json	Tue Mar 17 15:41:39 2020 +0100
     2.3 @@ -0,0 +1,21 @@
     2.4 +{
     2.5 +  "images" : [
     2.6 +    {
     2.7 +      "idiom" : "universal",
     2.8 +      "filename" : "asset-Office365.pdf",
     2.9 +      "scale" : "1x"
    2.10 +    },
    2.11 +    {
    2.12 +      "idiom" : "universal",
    2.13 +      "scale" : "2x"
    2.14 +    },
    2.15 +    {
    2.16 +      "idiom" : "universal",
    2.17 +      "scale" : "3x"
    2.18 +    }
    2.19 +  ],
    2.20 +  "info" : {
    2.21 +    "version" : 1,
    2.22 +    "author" : "xcode"
    2.23 +  }
    2.24 +}
    2.25 \ No newline at end of file
     3.1 Binary file pEpForiOS/Resources/Assets.xcassets/Providers/asset-Office365.imageset/asset-Office365.pdf has changed
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/pEpForiOS/Resources/Assets.xcassets/Providers/asset-Outlook.imageset/Contents.json	Tue Mar 17 15:41:39 2020 +0100
     4.3 @@ -0,0 +1,21 @@
     4.4 +{
     4.5 +  "images" : [
     4.6 +    {
     4.7 +      "idiom" : "universal",
     4.8 +      "filename" : "asset-Outlook.pdf",
     4.9 +      "scale" : "1x"
    4.10 +    },
    4.11 +    {
    4.12 +      "idiom" : "universal",
    4.13 +      "scale" : "2x"
    4.14 +    },
    4.15 +    {
    4.16 +      "idiom" : "universal",
    4.17 +      "scale" : "3x"
    4.18 +    }
    4.19 +  ],
    4.20 +  "info" : {
    4.21 +    "version" : 1,
    4.22 +    "author" : "xcode"
    4.23 +  }
    4.24 +}
    4.25 \ No newline at end of file
     5.1 Binary file pEpForiOS/Resources/Assets.xcassets/Providers/asset-Outlook.imageset/asset-Outlook.pdf has changed
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/pEpForiOS/Resources/Assets.xcassets/Providers/asset-iCloud.imageset/Contents.json	Tue Mar 17 15:41:39 2020 +0100
     6.3 @@ -0,0 +1,21 @@
     6.4 +{
     6.5 +  "images" : [
     6.6 +    {
     6.7 +      "idiom" : "universal",
     6.8 +      "filename" : "asset-iCloud.pdf",
     6.9 +      "scale" : "1x"
    6.10 +    },
    6.11 +    {
    6.12 +      "idiom" : "universal",
    6.13 +      "scale" : "2x"
    6.14 +    },
    6.15 +    {
    6.16 +      "idiom" : "universal",
    6.17 +      "scale" : "3x"
    6.18 +    }
    6.19 +  ],
    6.20 +  "info" : {
    6.21 +    "version" : 1,
    6.22 +    "author" : "xcode"
    6.23 +  }
    6.24 +}
    6.25 \ No newline at end of file
     7.1 Binary file pEpForiOS/Resources/Assets.xcassets/Providers/asset-iCloud.imageset/asset-iCloud.pdf has changed
     8.1 --- a/pEpForiOS/UI/ClientCertificateManagement/ClientCertificateManagementViewModel.swift	Tue Mar 17 11:45:23 2020 +0100
     8.2 +++ b/pEpForiOS/UI/ClientCertificateManagement/ClientCertificateManagementViewModel.swift	Tue Mar 17 15:41:39 2020 +0100
     8.3 @@ -34,7 +34,8 @@
     8.4      public init(verifiableAccount: VerifiableAccountProtocol? = nil,
     8.5                  clientCertificateUtil: ClientCertificateUtil = ClientCertificateUtil()) {
     8.6          self.clientCertificateUtil = clientCertificateUtil
     8.7 -        self.verifiableAccount = verifiableAccount ?? VerifiableAccount()
     8.8 +        self.verifiableAccount = verifiableAccount ??
     8.9 +            VerifiableAccount.verifiableAccount(for: .clientCertificate)
    8.10          setup()
    8.11      }
    8.12  
     9.1 --- a/pEpForiOS/UI/Login/AccountTypeSelectorViewController.swift	Tue Mar 17 11:45:23 2020 +0100
     9.2 +++ b/pEpForiOS/UI/Login/AccountTypeSelectorViewController.swift	Tue Mar 17 15:41:39 2020 +0100
     9.3 @@ -85,7 +85,7 @@
     9.4      func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
     9.5          let cellProvider = viewModel[indexPath.row]
     9.6          switch cellProvider {
     9.7 -        case .gmail:
     9.8 +        case .gmail, .o365, .icloud, .outlook:
     9.9              guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "providerImageCell",
    9.10                                                                  for: indexPath) as? AccountTypeSelectorImageCollectionViewCell else {
    9.11                                                                      return UICollectionViewCell()
    10.1 --- a/pEpForiOS/UI/Login/LoginViewController.swift	Tue Mar 17 11:45:23 2020 +0100
    10.2 +++ b/pEpForiOS/UI/Login/LoginViewController.swift	Tue Mar 17 15:41:39 2020 +0100
    10.3 @@ -98,7 +98,7 @@
    10.4          // isOauthAccount is use to disable for ever the password field (when loading this view)
    10.5          // isOAuth2Possible is use to hide password field only if isOauthAccount is false and the
    10.6          // user type a possible ouath in the email textfield.
    10.7 -        if vm.isOAuth2Possible(email: email) || vm.verifiableAccount.accountType.isOauth {
    10.8 +        if vm.verifiableAccount.accountType.isOauth {
    10.9              let oauth = appConfig.oauth2AuthorizationFactory.createOAuth2Authorizer()
   10.10              vm.loginWithOAuth2(viewController: self,
   10.11                                 emailAddress: email,
   10.12 @@ -117,10 +117,6 @@
   10.13          }
   10.14      }
   10.15  
   10.16 -    @IBAction func emailChanged(_ sender: UITextField) {
   10.17 -        updatePasswordField(email: sender.text)
   10.18 -    }
   10.19 -
   10.20      @IBAction func pEpSyncStateChanged(_ sender: UISwitch) {
   10.21          guard let vm = viewModel else {
   10.22              Log.shared.errorAndCrash("No VM")
   10.23 @@ -157,28 +153,6 @@
   10.24      }
   10.25  }
   10.26  
   10.27 -// MARK: - Private
   10.28 -
   10.29 -extension LoginViewController {
   10.30 -    private func updatePasswordField(email: String?) {
   10.31 -        guard let vm = viewModel else {
   10.32 -            Log.shared.errorAndCrash("No VM")
   10.33 -            return
   10.34 -        }
   10.35 -
   10.36 -        guard !vm.verifiableAccount.accountType.isOauth else { return }
   10.37 -
   10.38 -        let oauth2Possible = vm.isOAuth2Possible(email: email)
   10.39 -        password.isEnabled = !oauth2Possible
   10.40 -
   10.41 -        if oauth2Possible {
   10.42 -            hidePasswordTextField()
   10.43 -        } else {
   10.44 -            showPasswordTextField()
   10.45 -        }
   10.46 -    }
   10.47 -}
   10.48 -
   10.49  // MARK: - UITextFieldDelegate
   10.50  
   10.51  extension LoginViewController: UITextFieldDelegate {
    11.1 --- a/pEpForiOS/UI/Login/ViewModel/AccountTypeSelectorViewModel.swift	Tue Mar 17 11:45:23 2020 +0100
    11.2 +++ b/pEpForiOS/UI/Login/ViewModel/AccountTypeSelectorViewModel.swift	Tue Mar 17 15:41:39 2020 +0100
    11.3 @@ -9,25 +9,27 @@
    11.4  import Foundation
    11.5  import MessageModel
    11.6  
    11.7 -
    11.8 -
    11.9  protocol AccountTypeSelectorViewModelDelegate: class {
   11.10      func showMustImportClientCertificateAlert()
   11.11      func showClientCertificateSeletionView()
   11.12  }
   11.13  
   11.14  class AccountTypeSelectorViewModel {
   11.15 -    private var verifiableAccount: VerifiableAccountProtocol
   11.16      private let clientCertificateUtil: ClientCertificateUtilProtocol
   11.17  
   11.18      public weak var delegate: AccountTypeSelectorViewModelDelegate?
   11.19  
   11.20      /// list of providers to show
   11.21 -    private let accountTypes: [VerifiableAccount.AccountType] = [.gmail, .clientCertificate, .other]
   11.22 +    private let accountTypes: [VerifiableAccount.AccountType] = [.gmail,
   11.23 +                                                                 .o365,
   11.24 +                                                                 .icloud,
   11.25 +                                                                 .outlook,
   11.26 +                                                                 .clientCertificate,
   11.27 +                                                                 .other]
   11.28  
   11.29 -    init(verifiableAccount: VerifiableAccountProtocol? = nil,
   11.30 -         clientCertificateUtil: ClientCertificateUtilProtocol? = nil) {
   11.31 -        self.verifiableAccount = verifiableAccount ?? VerifiableAccount()
   11.32 +    var chosenAccountType: VerifiableAccount.AccountType = .other
   11.33 +
   11.34 +    init(clientCertificateUtil: ClientCertificateUtilProtocol? = nil) {
   11.35          self.clientCertificateUtil = clientCertificateUtil ?? ClientCertificateUtil()
   11.36      }
   11.37  
   11.38 @@ -53,7 +55,7 @@
   11.39          if clientCertificateUtil.listCertificates(session: nil).count == 0 {
   11.40              delegate?.showMustImportClientCertificateAlert()
   11.41          } else {
   11.42 -            verifiableAccount.accountType = .clientCertificate
   11.43 +            chosenAccountType = .clientCertificate
   11.44              delegate?.showClientCertificateSeletionView()
   11.45          }
   11.46      }
   11.47 @@ -71,6 +73,12 @@
   11.48              Client
   11.49              Certificate
   11.50              """, comment: "client certificate provider key")
   11.51 +        case .o365:
   11.52 +            return "asset-Office365"
   11.53 +        case .icloud:
   11.54 +            return "asset-iCloud"
   11.55 +        case .outlook:
   11.56 +            return "asset-Outlook"
   11.57          }
   11.58      }
   11.59  
   11.60 @@ -79,14 +87,14 @@
   11.61      }
   11.62  
   11.63      public func handleDidSelect(rowAt indexPath: IndexPath) {
   11.64 -        verifiableAccount.accountType = accountTypes[indexPath.row]
   11.65 +        chosenAccountType = accountTypes[indexPath.row]
   11.66      }
   11.67  
   11.68      public func clientCertificateManagementViewModel() -> ClientCertificateManagementViewModel {
   11.69 -           return ClientCertificateManagementViewModel(verifiableAccount: verifiableAccount)
   11.70 -       }
   11.71 +        return ClientCertificateManagementViewModel(verifiableAccount: VerifiableAccount.verifiableAccount(for: chosenAccountType))
   11.72 +    }
   11.73  
   11.74      public func loginViewModel() -> LoginViewModel {
   11.75 -           return LoginViewModel(verifiableAccount: verifiableAccount)
   11.76 -       }
   11.77 +        return LoginViewModel(verifiableAccount: VerifiableAccount.verifiableAccount(for: chosenAccountType))
   11.78 +    }
   11.79  }
    12.1 --- a/pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift	Tue Mar 17 11:45:23 2020 +0100
    12.2 +++ b/pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift	Tue Mar 17 15:41:39 2020 +0100
    12.3 @@ -57,7 +57,8 @@
    12.4      let qualifyServerIsLocalService = QualifyServerIsLocalService()
    12.5  
    12.6      init(verifiableAccount: VerifiableAccountProtocol? = nil) {
    12.7 -        self.verifiableAccount = verifiableAccount ?? VerifiableAccount()
    12.8 +        self.verifiableAccount = verifiableAccount ??
    12.9 +            VerifiableAccount.verifiableAccount(for: .other)
   12.10      }
   12.11  
   12.12  
   12.13 @@ -84,7 +85,9 @@
   12.14                                viewController: viewController)
   12.15      }
   12.16  
   12.17 -    /// Tries to "login", that is, retrieve account data, with the given parameters.
   12.18 +    /// Depending on `VerifiableAccountProtocol.containsCompleteServerInfo`,
   12.19 +    /// either tries to retrive account settings via a query
   12.20 +    /// to the account settings lib, or procedes directly to attempting a login.
   12.21      /// - Parameters:
   12.22      ///   - emailAddres: The email of this account
   12.23      ///   - displayName: The chosen name of the user, or nick
   12.24 @@ -96,6 +99,37 @@
   12.25                 loginName: String? = nil,
   12.26                 password: String? = nil,
   12.27                 accessToken: OAuth2AccessTokenProtocol? = nil) {
   12.28 +        if verifiableAccount.containsCompleteServerInfo {
   12.29 +            addVerificationData(verifiableAccount: verifiableAccount,
   12.30 +                                emailAddress: emailAddress,
   12.31 +                                displayName: displayName,
   12.32 +                                loginName: loginName,
   12.33 +                                password: password,
   12.34 +                                accessToken: accessToken)
   12.35 +
   12.36 +            checkIfServerShouldBeConsideredATrustedServer()
   12.37 +        } else {
   12.38 +            loginViaAccountSettings(emailAddress: emailAddress,
   12.39 +                                    displayName: displayName,
   12.40 +                                    loginName: loginName,
   12.41 +                                    password: password,
   12.42 +                                    accessToken: accessToken)
   12.43 +        }
   12.44 +    }
   12.45 +
   12.46 +    /// Tries to get login information via account settings, then continues with
   12.47 +    /// the account setup (login).
   12.48 +    /// - Parameters:
   12.49 +    ///   - emailAddress: The email of this account
   12.50 +    ///   - displayName: The chosen name of the user, or nick
   12.51 +    ///   - loginName: The optional login name for this account, if different from the email
   12.52 +    ///   - password: The password for the account
   12.53 +    ///   - accessToken: The access token for this account
   12.54 +    private func loginViaAccountSettings(emailAddress: String,
   12.55 +                                         displayName: String,
   12.56 +                                         loginName: String? = nil,
   12.57 +                                         password: String? = nil,
   12.58 +                                         accessToken: OAuth2AccessTokenProtocol? = nil) {
   12.59          let acSettings = AccountSettings(accountName: emailAddress,
   12.60                                           provider: nil,
   12.61                                           flags: AS_FLAG_USE_ANY,
   12.62 @@ -123,20 +157,13 @@
   12.63              let smtpTransport = ConnectionTransport(accountSettingsTransport: outgoingServer.transport,
   12.64                                                      smtpPort: outgoingServer.port)
   12.65  
   12.66 -            verifiableAccount.verifiableAccountDelegate = self
   12.67 -            verifiableAccount.address = emailAddress
   12.68 -            verifiableAccount.userName = displayName
   12.69 +            addVerificationData(verifiableAccount: verifiableAccount,
   12.70 +                                emailAddress: emailAddress,
   12.71 +                                displayName: displayName,
   12.72 +                                loginName: loginName,
   12.73 +                                password: password,
   12.74 +                                accessToken: accessToken)
   12.75  
   12.76 -            let login = loginName ?? emailAddress
   12.77 -            verifiableAccount.loginNameIMAP = login
   12.78 -            verifiableAccount.loginNameSMTP = login
   12.79 -
   12.80 -            // Note: auth method is never taken from LAS. We either have OAuth2,
   12.81 -            // as determined previously, or we will defer to pantomime to find out the best method.
   12.82 -            verifiableAccount.authMethod = accessToken != nil ? .saslXoauth2 : nil
   12.83 -
   12.84 -            verifiableAccount.password = password
   12.85 -            verifiableAccount.accessToken = accessToken
   12.86              verifiableAccount.serverIMAP = incomingServer.hostname
   12.87              verifiableAccount.portIMAP = UInt16(incomingServer.port)
   12.88              verifiableAccount.transportIMAP = imapTransport
   12.89 @@ -149,11 +176,38 @@
   12.90          }
   12.91      }
   12.92  
   12.93 -    /// Is an account with this email address typically an OAuth2 account?
   12.94 -    /// Only uses fast local lookups.
   12.95 -    /// - Parameter email: Returns true, if this is an OAuth2 email address, true otherwise.
   12.96 -    func isOAuth2Possible(email: String?) -> Bool {
   12.97 -        return AccountSettings.quickLookUp(emailAddress: email)?.supportsOAuth2 ?? false
   12.98 +    /// Set up a given verifiable account with parameters, changing it in-place.
   12.99 +    /// - Parameters:
  12.100 +    ///   - verifiableAccount: The verifiable account to change
  12.101 +    ///   - emailAddress: The email address of the account
  12.102 +    ///   - displayName: The user-chosen display name / nick
  12.103 +    ///   - loginName: The login name needed for the servers, if different from the email address
  12.104 +    ///   - password: The password to log in
  12.105 +    ///   - accessToken: An optional OAUTH2 access token
  12.106 +    private func addVerificationData(verifiableAccount: VerifiableAccountProtocol,
  12.107 +                                     emailAddress: String,
  12.108 +                                     displayName: String,
  12.109 +                                     loginName: String? = nil,
  12.110 +                                     password: String? = nil,
  12.111 +                                     accessToken: OAuth2AccessTokenProtocol? = nil) {
  12.112 +        var theVerifiableAccount = verifiableAccount
  12.113 +
  12.114 +        // Note: auth method is never taken from LAS. We either have OAuth2,
  12.115 +        // as determined previously, or we will defer to pantomime to find out the best method.
  12.116 +        theVerifiableAccount.authMethod = accessToken != nil ? .saslXoauth2 : nil
  12.117 +
  12.118 +        theVerifiableAccount.verifiableAccountDelegate = self
  12.119 +        theVerifiableAccount.address = emailAddress
  12.120 +        theVerifiableAccount.userName = displayName
  12.121 +
  12.122 +        let login = loginName ?? emailAddress
  12.123 +        theVerifiableAccount.loginNameIMAP = login
  12.124 +        theVerifiableAccount.loginNameSMTP = login
  12.125 +
  12.126 +        theVerifiableAccount.password = password
  12.127 +        theVerifiableAccount.accessToken = accessToken
  12.128 +
  12.129 +        theVerifiableAccount.verifiableAccountDelegate = self
  12.130      }
  12.131  }
  12.132  
    13.1 --- a/pEpForiOS/UI/Settings/Setting/AccountSettings/EditableAccountSettings/Container/EditableAccountSettingsViewModel.swift	Tue Mar 17 11:45:23 2020 +0100
    13.2 +++ b/pEpForiOS/UI/Settings/Setting/AccountSettings/EditableAccountSettings/Container/EditableAccountSettingsViewModel.swift	Tue Mar 17 15:41:39 2020 +0100
    13.3 @@ -138,7 +138,7 @@
    13.4                          password: String? = nil,
    13.5                          imap: ServerViewModel,
    13.6                          smtp: ServerViewModel) {
    13.7 -        var theVerifier = verifiableAccount ?? VerifiableAccount()
    13.8 +        var theVerifier = verifiableAccount ?? VerifiableAccount.verifiableAccount(for: .other)
    13.9          theVerifier.verifiableAccountDelegate = self
   13.10          verifiableAccount = theVerifier
   13.11  
    14.1 --- a/pEpForiOSTests/Models/AccountTypeSelectorTest.swift	Tue Mar 17 11:45:23 2020 +0100
    14.2 +++ b/pEpForiOSTests/Models/AccountTypeSelectorTest.swift	Tue Mar 17 15:41:39 2020 +0100
    14.3 @@ -38,9 +38,8 @@
    14.4      func testNoClientCertificateAlert() {
    14.5          let delegateExpectation = expectation(description: "delegateExpectation")
    14.6          let vmDelegate = AccountTypeDelegateMockTest(noClientCertificatesExpectation: delegateExpectation)
    14.7 -        let verificableAccount = VerificableAccountMockTest()
    14.8          let clientCertificateUtil = ClientCertificateUtilMockTest()
    14.9 -        let vm = AccountTypeSelectorViewModel(verifiableAccount: verificableAccount, clientCertificateUtil: clientCertificateUtil)
   14.10 +        let vm = AccountTypeSelectorViewModel(clientCertificateUtil: clientCertificateUtil)
   14.11          vm.delegate = vmDelegate
   14.12          vm.handleDidChooseClientCertificate()
   14.13          waitForExpectations(timeout: TestUtil.waitTime)
   14.14 @@ -51,8 +50,7 @@
   14.15          let delegateExpectation = expectation(description: "delegateExpectation")
   14.16          let vmDelegate = AccountTypeDelegateMockTest(thereAreClientCertificatesExpectation: delegateExpectation)
   14.17          let clientCertificateUtil = ClientCertificateUtilMockTest(thereAreCerts: true)
   14.18 -        let verificableAccount = VerificableAccountMockTest()
   14.19 -        let vm = AccountTypeSelectorViewModel(verifiableAccount: verificableAccount, clientCertificateUtil: clientCertificateUtil)
   14.20 +        let vm = AccountTypeSelectorViewModel(clientCertificateUtil: clientCertificateUtil)
   14.21          vm.delegate = vmDelegate
   14.22          vm.handleDidChooseClientCertificate()
   14.23          waitForExpectations(timeout: TestUtil.waitTime)
   14.24 @@ -71,7 +69,7 @@
   14.25      }
   14.26      
   14.27      func testNumberOfSections() {
   14.28 -        let expectedSections = 3
   14.29 +        let expectedSections = 6
   14.30          let vm = AccountTypeSelectorViewModel()
   14.31          XCTAssertEqual(expectedSections, vm.count)
   14.32      }
   14.33 @@ -124,57 +122,3 @@
   14.34          
   14.35      }
   14.36  }
   14.37 -
   14.38 -class VerificableAccountMockTest: VerifiableAccountProtocol {
   14.39 -    
   14.40 -    var verifiableAccountDelegate: VerifiableAccountDelegate?
   14.41 -    
   14.42 -    var accountType: VerifiableAccount.AccountType = .clientCertificate
   14.43 -    
   14.44 -    var address: String?
   14.45 -    
   14.46 -    var userName: String?
   14.47 -    
   14.48 -    var authMethod: AuthMethod?
   14.49 -    
   14.50 -    var password: String?
   14.51 -    
   14.52 -    var keySyncEnable: Bool = false
   14.53 -    
   14.54 -    var accessToken: OAuth2AccessTokenProtocol?
   14.55 -    
   14.56 -    var clientCertificate: ClientCertificate?
   14.57 -    
   14.58 -    var loginNameIMAP: String?
   14.59 -    
   14.60 -    var serverIMAP: String?
   14.61 -    
   14.62 -    var portIMAP: UInt16 = 0
   14.63 -    
   14.64 -    var transportIMAP: ConnectionTransport = .plain
   14.65 -    
   14.66 -    var loginNameSMTP: String?
   14.67 -    
   14.68 -    var serverSMTP: String?
   14.69 -    
   14.70 -    var portSMTP: UInt16 = 0
   14.71 -    
   14.72 -    var transportSMTP: ConnectionTransport = .plain
   14.73 -    
   14.74 -    var isAutomaticallyTrustedImapServer: Bool = false
   14.75 -    
   14.76 -    var isManuallyTrustedImapServer: Bool = false
   14.77 -    
   14.78 -    func verify() throws {
   14.79 -        return
   14.80 -    }
   14.81 -    
   14.82 -    func save(completion: ((Success) -> ())?) throws {
   14.83 -        return
   14.84 -    }
   14.85 -    
   14.86 -    var loginNameIsValid: Bool = false
   14.87 -    
   14.88 -    var isValidUser: Bool = false
   14.89 -    
   14.90 -}
    15.1 --- a/pEpForiOSTests/Models/LoginViewModelTests.swift	Tue Mar 17 11:45:23 2020 +0100
    15.2 +++ b/pEpForiOSTests/Models/LoginViewModelTests.swift	Tue Mar 17 15:41:39 2020 +0100
    15.3 @@ -56,6 +56,8 @@
    15.4  
    15.5          let isValidUser = false
    15.6  
    15.7 +        var containsCompleteServerInfo: Bool = false
    15.8 +
    15.9          func verify() throws {
   15.10              XCTAssertEqual(address, accountSettings.idAddress)
   15.11