-
Notifications
You must be signed in to change notification settings - Fork 5
Sync biometrics with main #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/biometrics
Are you sure you want to change the base?
Conversation
…re/biometrics # Conflicts: # TwilioVerifySDK.xcodeproj/project.pbxproj # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeychainQuery.swift # TwilioVerifySDKTests/TwilioSecurity/Sources/Keychain/KeychainQueryTests.swift # TwilioVerifySDKTests/TwilioSecurity/Sources/Keychain/Mocks/KeychainMock.swift # fastlane/Fastfile
* [26703] - Add Optional Attemps for CopyItemMatching. - Add Optional attempt for get queries on SecureStorage & AuthenticatedSecureStorage. * [26703] - Add Optional Attemps for CopyItemMatching. - Set only 1 retry for the AuthenticatedSecureStorage biometric verification.
- Make KeychainError public. Co-authored-by: Yeimi Moreno <[email protected]>
BREAKING CHANGE: Dropped support for iOS 11
…ion, for enabling users to migrate their factors to another iPhone or restore them during backup processes. (#218)
* fix: Gemfile to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-RUBY-REXML-6861566 * Update CircleCI Resources --------- Co-authored-by: snyk-bot <[email protected]>
# Conflicts: # Gemfile.lock # README.md # fastlane/Fastfile
Version 3.0.0
…ios into ymoreno/biometrics # Conflicts: # fastlane/Fastfile
…no/biometrics # Conflicts: # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/Keychain.swift # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeychainQuery.swift # TwilioVerifySDKTests/TwilioSecurity/Sources/Keychain/KeychainQueryTests.swift
var accessGroup: String? | ||
let accessGroup: String? | ||
|
||
init(accessGroup: String?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This memberwise initializer would be synthesized automatically - you do not need to define itunneeded_synthesized_initializer KeychainQuery.swift:60 |
} | ||
|
||
func testSaveData_withKey_shouldReturnValidQuery() { | ||
let expectedData = "data".data(using: .utf8)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer non-optional Data(_:) initializer when converting String to Data non_optional_string_data_conversion KeychainQueryTests.swift:78 |
|
||
func testSaveItem_withAccessGroup_shouldReturnValidQuery() { | ||
keychainQuery = KeychainQuery(accessGroup: Constants.accessGroup) | ||
let expectedData = "data".data(using: .utf8)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer non-optional Data(_:) initializer when converting String to Data non_optional_string_data_conversion KeychainQueryTests.swift:145 |
|
||
func testSaveItem_withAttrAccessible_shouldReturnValidQuery() { | ||
keychainQuery = KeychainQuery(accessGroup: Constants.accessGroup) | ||
let expectedData = "data".data(using: .utf8)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer non-optional Data(_:) initializer when converting String to Data non_optional_string_data_conversion KeychainQueryTests.swift:162 |
|
||
func testCreateFactor_withSuccessResponse_shouldSucceed() { | ||
let successExpectation = expectation(description: "Wait for success response") | ||
let expectedResponse = "{\"key\":\"value\"}".data(using: .utf8)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer non-optional Data(_:) initializer when converting String to Data non_optional_string_data_conversion FactorAPIClientTests.swift:41 |
"User agent header should not be nil") | ||
XCTAssertEqual(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self), params.asString(), | ||
"Body should be \(params.asString()) but was \(networkProvider.urlRequest!.httpBody!)") | ||
XCTAssert(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == params.asString() || String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == paramsv2.asString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer failable String(data:encoding:) initializer when converting Data to String optional_data_string_conversion FactorAPIClientTests.swift:161 |
"User agent header should not be nil") | ||
XCTAssertEqual(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self), params.asString(), | ||
"Body should be \(params.asString()) but was \(networkProvider.urlRequest!.httpBody!)") | ||
XCTAssert(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == params.asString() || String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == paramsv2.asString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line should be 195 characters or less; currently it has 203 charactersline_length FactorAPIClientTests.swift:161 |
XCTAssertEqual(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self), params.asString(), | ||
"Body should be \(params.asString()) but was \(networkProvider.urlRequest!.httpBody!)") | ||
XCTAssert(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == params.asString() || String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == paramsv2.asString(), | ||
"Body should be \(params.asString()) or \(paramsv2.asString()) but was \(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self))") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer failable String(data:encoding:) initializer when converting Data to String optional_data_string_conversion FactorAPIClientTests.swift:162 |
) | ||
static let failureResponse = FailureResponse( | ||
statusCode: 401, | ||
errorData: "error".data(using: .utf8)!, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer non-optional Data(_:) initializer when converting String to Data non_optional_string_data_conversion FactorAPIClientTests.swift:475 |
@testable import TwilioVerifySDK | ||
|
||
// swiftlint:disable force_cast force_try | ||
// swiftlint:disable force_cast force_try type_body_length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'next', 'this' or 'previous' instead to disable the 'type_body_length' rule once, or re-enable it as soon as possible
blanket_disable_command FactorMapperTests.swift:23` |
@testable import TwilioVerifySDK | ||
|
||
// swiftlint:disable force_cast force_try | ||
// swiftlint:disable force_cast force_try type_body_length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'next', 'this' or 'previous' instead to disable the 'force_try' rule once, or re-enable it as soon as possible
blanket_disable_command FactorMapperTests.swift:23` |
@testable import TwilioVerifySDK | ||
|
||
// swiftlint:disable force_cast force_try | ||
// swiftlint:disable force_cast force_try type_body_length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'next', 'this' or 'previous' instead to disable the 'force_cast' rule once, or re-enable it as soon as possible
blanket_disable_command FactorMapperTests.swift:23` |
@testable import TwilioVerifySDK | ||
|
||
// swiftlint:disable force_cast force_try | ||
// swiftlint:disable force_cast force_try type_body_length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SwiftLint rule 'type_body_length' did not trigger a violation in the disabled region; remove the disable commandsuperfluous_disable_command FactorMapperTests.swift:23 |
let factorPayload = CreateFactorPayload(friendlyName: Constants.friendlyNameValue, type: Constants.pushType, allowIphoneMigration: false, serviceSid: Constants.serviceSidValue, | ||
identity: Constants.identityValue, config: [:], binding: [:], accessToken: Constants.accessToken, metadata: nil) | ||
XCTAssertThrowsError(try mapper.fromAPI(withData: data, factorPayload: factorPayload)) { error in | ||
XCTAssertEqual((error as! TwilioVerifyError).errorDescription, TwilioVerifyError.mapperError(error: NSError()).errorDescription) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discouraged direct initialization of types that can be harmfuldiscouraged_direct_init FactorMapperTests.swift:127 |
Code coverageTotal coverage:
|
File | Coverage |
---|---|
TwilioVerifySDK/TwilioSecurity/Sources/Key/Signer/ECSigner.swift | 100.00% |
TwilioVerifySDK/TwilioSecurity/Sources/Key/Template/ECP256SignerTemplate.swift | 93.02% |
TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeyManager.swift | 89.66% |
TwilioVerifySDK/TwilioSecurity/Sources/Keychain/Keychain.swift | 89.06% |
TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeychainQuery.swift | 100.00% |
TwilioVerifySDK/TwilioSecurity/Sources/Storage/AuthenticatedSecureStorage.swift | 93.42% |
TwilioVerifySDK/TwilioSecurity/Sources/Storage/SecureStorage.swift | 87.36% |
TwilioVerifySDK/TwilioVerify/Sources/API/ChallengeAPIClient.swift | 93.62% |
TwilioVerifySDK/TwilioVerify/Sources/Data/JWT/JwtGenerator.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Data/JWT/JwtSigner.swift | 74.75% |
TwilioVerifySDK/TwilioVerify/Sources/Data/KeyStorage.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Data/Storage+AccessGroup.swift | 93.48% |
TwilioVerifySDK/TwilioVerify/Sources/Data/Storage.swift | 91.18% |
TwilioVerifySDK/TwilioVerify/Sources/Data/StorageProvider.swift | 80.85% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Challenge/ChallengeFacade.swift | 96.84% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Challenge/ChallengeRepository.swift | 94.37% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Challenge/PushChallengeProcessor.swift | 97.30% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/FactorFacade.swift | 97.93% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/FactorMapper.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/FactorRepository.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/Models/PushFactor.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/PushFactory.swift | 98.90% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Manager/TwilioVerify.swift | 81.25% |
TwilioVerifySDK/TwilioVerify/Sources/Domain/Manager/TwilioVerifyManager.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Logger/Logger.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Models/ChallengeListPayload.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Models/Factor.swift | 85.71% |
TwilioVerifySDK/TwilioVerify/Sources/Models/FactorPayload.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Models/UpdateChallengePayload.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Models/UpdateFactorPayload.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Models/VerifyFactorPayload.swift | 100.00% |
TwilioVerifySDK/TwilioVerify/Sources/Networking/Authentication.swift | 100.00% |
Powered by Slather
Generated by 🚫 Danger
…ipeline chore: Fix release process
chore: Fix Github author for CI
chore: fix release process.
…no/biometrics # Conflicts: # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/Keychain.swift # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeychainQuery.swift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Ticket
Github Issue
Description
Commit message
Screenshot
Testing