Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions BitwardenShared/Core/Auth/Repositories/AuthRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,8 @@ extension DefaultAuthRepository: AuthRepository {
case .decryptedKey,
.deviceKey,
.keyConnector,
.pin:
.pin,
.pinEnvelope: // TODO: PM-23289 will change in this ticket
// No-op: nothing extra to do.
break
}
Expand Down Expand Up @@ -1195,7 +1196,8 @@ extension DefaultAuthRepository: AuthRepository {
case .authRequest,
.deviceKey,
.keyConnector,
.pin:
.pin,
.pinEnvelope: // TODO: PM-23289 will change in this ticket
break
case .decryptedKey,
.password:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ class MockCryptoClient: CryptoClientProtocol {
var enrollAdminPasswordPublicKey: String?
var enrollAdminPasswordResetResult: Result<String, Error> = .success("RESET_PASSWORD_KEY")

var enrollPinPin: String?
var enrollPinResult: Result<EnrollPinResponse, Error> = .success(
EnrollPinResponse(
pinProtectedUserKeyEnvelope: "pinProtectedUserKeyEnvelope",
userKeyEncryptedPin: "userKeyEncryptedPin"
)
)

var enrollPinWithEncryptedPinEncryptedPin: String?
var enrollPinWithEncryptedPinResult: Result<EnrollPinResponse, Error> = .success(
EnrollPinResponse(
pinProtectedUserKeyEnvelope: "pinProtectedUserKeyEnvelope",
userKeyEncryptedPin: "userKeyEncryptedPin"
)
)

var getUserEncryptionKeyCalled = false
var getUserEncryptionKeyResult: Result<String, Error> = .success("USER_ENCRYPTION_KEY")

Expand Down Expand Up @@ -56,6 +72,16 @@ class MockCryptoClient: CryptoClientProtocol {
return try enrollAdminPasswordResetResult.get()
}

func enrollPin(pin: String) throws -> EnrollPinResponse {
enrollPinPin = pin
return try enrollPinResult.get()
}

func enrollPinWithEncryptedPin(encryptedPin: EncString) throws -> EnrollPinResponse {
enrollPinWithEncryptedPinEncryptedPin = encryptedPin
return try enrollPinWithEncryptedPinResult.get()
}

func getUserEncryptionKey() async throws -> String {
getUserEncryptionKeyCalled = true
return try getUserEncryptionKeyResult.get()
Expand Down
4 changes: 1 addition & 3 deletions project-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ options:
usesTabs: false
indentWidth: 4
tabWidth: 4

include:
- path: Configs/local-sdk.yml
relativePaths: false
enable: ${LOCAL_SDK}

packages:
BitwardenSdk:
url: https://github.com/bitwarden/sdk-swift
revision: fe0f17e2c217497fe83e40c8dca324880070dea9
revision: bb36b4848c5006b4c14f53c07476d12e6f8708ef # 1.0.0-283-7b5d9db
branch: unstable
Firebase:
url: https://github.com/firebase/firebase-ios-sdk
Expand Down
Loading