Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// An enumeration of methods used to unlock the user's vault after two-factor authentication
/// completes successfully.
///
public enum TwoFactorUnlockMethod: Equatable {
public enum TwoFactorUnlockMethod: Equatable, Sendable {
/// The vault should be unlocked with the response from logging in with another device.
case loginWithDevice(key: String, masterPasswordHash: String?, privateKey: String)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public struct AuthMethodsData: Codable, Equatable, Sendable {
// MARK: - Duo

/// Struct with information regarding Duo two factor authentication
public struct Duo: Codable, Equatable {
public struct Duo: Codable, Equatable, Sendable {
enum CodingKeys: String, CodingKey {
case authUrl = "AuthUrl"
case host = "Host"
Expand All @@ -110,7 +110,7 @@ public struct Email: Codable, Equatable, Sendable {
// MARK: - WebAuthn

/// Struct with information regarding WebAuthn two factor authentication
public struct WebAuthn: Codable, Equatable {
public struct WebAuthn: Codable, Equatable, Sendable {
/// Credentials allowed to be used to solve the challenge
let allowCredentials: [AllowCredential]?

Expand All @@ -136,7 +136,7 @@ public struct WebAuthn: Codable, Equatable {
// MARK: - AllowCredential

/// Struct with information regarding user credentials for WebAuthn two factor authentication
public struct AllowCredential: Codable, Equatable {
public struct AllowCredential: Codable, Equatable, Sendable {
/// Public key identifier
let id: String?

Expand All @@ -147,7 +147,7 @@ public struct AllowCredential: Codable, Equatable {
// MARK: - Yubikey

/// Struct with information for two factor authentication with Yubikeys
public struct Yubikey: Codable, Equatable {
public struct Yubikey: Codable, Equatable, Sendable {
enum CodingKeys: String, CodingKey {
case nfc = "Nfc"
}
Expand Down
4 changes: 2 additions & 2 deletions BitwardenShared/Core/Auth/Services/KeychainRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ class DefaultKeychainRepository: KeychainRepository {
)

if let resultDictionary = foundItem as? [String: Any],
let data = resultDictionary[kSecValueData as String] as? Data {
let string = String(decoding: data, as: UTF8.self)
let data = resultDictionary[kSecValueData as String] as? Data,
let string = String(data: data, encoding: .utf8) {
guard !string.isEmpty else {
throw KeychainServiceError.keyNotFound(item)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import XCTest

@testable import BitwardenShared

// swiftlint:disable file_length

final class ClientServiceTests: BitwardenTestCase { // swiftlint:disable:this type_body_length
var clientBuilder: MockClientBuilder!
var configService: MockConfigService!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import XCTest

@testable import BitwardenShared

// swiftlint:disable file_length

// MARK: - SendRepositoryTests

class SendRepositoryTests: BitwardenTestCase { // swiftlint:disable:this type_body_length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,15 @@ class PolicyServiceTests: BitwardenTestCase { // swiftlint:disable:this type_bod
passwordGeneratorPolicy,
.fixture(
data: [
PolicyOptionType.overridePasswordType.rawValue: .string(PasswordGeneratorType.password.rawValue),
PolicyOptionType.overridePasswordType.rawValue:
.string(PasswordGeneratorType.password.rawValue),
],
type: .passwordGenerator
),
.fixture(
data: [
PolicyOptionType.overridePasswordType.rawValue: .string(PasswordGeneratorType.passphrase.rawValue),
PolicyOptionType.overridePasswordType.rawValue:
.string(PasswordGeneratorType.passphrase.rawValue),
],
type: .passwordGenerator
),
Expand Down
2 changes: 1 addition & 1 deletion BitwardenShared/UI/Auth/AuthCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ final class AuthCoordinator: NSObject, // swiftlint:disable:this type_body_lengt
& HasEnvironmentService
& HasErrorReporter
& HasGeneratorRepository
& HasNotificationCenterService
& HasNFCReaderService
& HasNotificationCenterService
& HasOrganizationAPIService
& HasPolicyService
& HasSettingsRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public class AppProcessor {
let accounts = try await services.stateService.getAccounts()
for account in accounts {
let userId = account.profile.userId
guard let progress = try await services.stateService.getAccountSetupAutofill(userId: userId),
guard let progress = await services.stateService.getAccountSetupAutofill(userId: userId),
progress != .complete
else { continue }
try await services.stateService.setAccountSetupAutofill(.complete, userId: userId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import SwiftUI

// swiftlint:disable file_length

/// A `StyleGuideFont` contains the font to use for a specific style.
///
struct StyleGuideFont {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/// Data model for a section of items in the send list.
///
public struct SendListSection: Equatable, Identifiable {
public struct SendListSection: Equatable, Identifiable, Sendable {
// MARK: Properties

/// The identifier for the section.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import XCTest

@testable import BitwardenShared

final class CipherViewUpdateTests: BitwardenTestCase {
final class CipherViewUpdateTests: BitwardenTestCase { // swiftlint:disable:this type_body_length
// MARK: Properties

var cipherItemState: CipherItemState!
Expand Down
Loading