Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
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
1 change: 0 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ platform :ios, ios_deployment_target
## =====================
##
def third_party_pods
pod '1PasswordExtension', '1.8.6'
pod 'Alamofire', '4.8'
pod 'CocoaLumberjack', '3.5.2'
pod 'GoogleSignIn', '6.0.1'
Expand Down
6 changes: 1 addition & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
PODS:
- 1PasswordExtension (1.8.6)
- Alamofire (4.8.0)
- AppAuth (1.4.0):
- AppAuth/Core (= 1.4.0)
Expand Down Expand Up @@ -43,7 +42,6 @@ PODS:
- wpxmlrpc (0.9.0)

DEPENDENCIES:
- 1PasswordExtension (= 1.8.6)
- Alamofire (= 4.8)
- CocoaLumberjack (= 3.5.2)
- Expecta (= 1.0.6)
Expand All @@ -60,7 +58,6 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- 1PasswordExtension
- Alamofire
- AppAuth
- CocoaLumberjack
Expand All @@ -83,7 +80,6 @@ SPEC REPOS:
- wpxmlrpc

SPEC CHECKSUMS:
1PasswordExtension: f97cc80ae58053c331b2b6dc8843ba7103b33794
Alamofire: 3ec537f71edc9804815215393ae2b1a8ea33a844
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
CocoaLumberjack: 118bf4a820efc641f79fa487b75ed928dccfae23
Expand All @@ -105,6 +101,6 @@ SPEC CHECKSUMS:
WordPressUI: 1cf47a3b78154faf69caa18569ee7ece1e510fa0
wpxmlrpc: bf55a43a7e710bd2a4fb8c02dfe83b1246f14f13

PODFILE CHECKSUM: 7cf50800dab5ef3d524c968936a1fc8242ea023c
PODFILE CHECKSUM: d9073c8eaf970df5ce640ddb8620640ada3e775e

COCOAPODS: 1.10.2
1 change: 0 additions & 1 deletion WordPressAuthenticator.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Pod::Spec.new do |s|
}
s.header_dir = 'WordPressAuthenticator'

s.dependency '1PasswordExtension', '~> 1.8.6'
s.dependency 'Alamofire', '~> 4.8'
s.dependency 'CocoaLumberjack', '~> 3.5'
s.dependency 'lottie-ios', '~> 3.1.6'
Expand Down
14 changes: 0 additions & 14 deletions WordPressAuthenticator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
B560910D208A54F800399AE4 /* WordPressXMLRPCAPIFacade.m in Sources */ = {isa = PBXBuildFile; fileRef = B5609102208A54F800399AE4 /* WordPressXMLRPCAPIFacade.m */; };
B560910E208A54F800399AE4 /* LoginFacade.h in Headers */ = {isa = PBXBuildFile; fileRef = B5609103208A54F800399AE4 /* LoginFacade.h */; settings = {ATTRIBUTES = (Public, ); }; };
B560910F208A54F800399AE4 /* SafariCredentialsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5609104208A54F800399AE4 /* SafariCredentialsService.swift */; };
B5609110208A54F800399AE4 /* OnePasswordFacade.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5609105208A54F800399AE4 /* OnePasswordFacade.swift */; };
B5609111208A54F800399AE4 /* WordPressXMLRPCAPIFacade.h in Headers */ = {isa = PBXBuildFile; fileRef = B5609106208A54F800399AE4 /* WordPressXMLRPCAPIFacade.h */; settings = {ATTRIBUTES = (Public, ); }; };
B5609116208A555600399AE4 /* LoginTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5609112208A555500399AE4 /* LoginTextField.swift */; };
B5609117208A555600399AE4 /* SearchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5609113208A555500399AE4 /* SearchTableViewCell.swift */; };
Expand Down Expand Up @@ -122,8 +121,6 @@
BA53D64824DFDF97001F1ABF /* WordPressSourceTagTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D64724DFDF97001F1ABF /* WordPressSourceTagTests.swift */; };
BA53D64B24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D64A24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift */; };
BA53D64D24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D64C24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift */; };
BA53D64F24DFE981001F1ABF /* MockOnePasswordFacade.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D64E24DFE981001F1ABF /* MockOnePasswordFacade.swift */; };
BA53D65324DFEA58001F1ABF /* OnePasswordResultsFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D65224DFEA58001F1ABF /* OnePasswordResultsFetcher.swift */; };
BA70352424F70C9F00B3AA1C /* ModalViewControllerPresenting.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA70352324F70C9F00B3AA1C /* ModalViewControllerPresenting.swift */; };
CE16177521B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16177421B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift */; };
CE16177821B70C1A00B82A47 /* WordPressAuthenticatorDisplayTextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16177721B70C1A00B82A47 /* WordPressAuthenticatorDisplayTextTests.swift */; };
Expand Down Expand Up @@ -287,7 +284,6 @@
B5609102208A54F800399AE4 /* WordPressXMLRPCAPIFacade.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WordPressXMLRPCAPIFacade.m; sourceTree = "<group>"; };
B5609103208A54F800399AE4 /* LoginFacade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginFacade.h; sourceTree = "<group>"; };
B5609104208A54F800399AE4 /* SafariCredentialsService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafariCredentialsService.swift; sourceTree = "<group>"; };
B5609105208A54F800399AE4 /* OnePasswordFacade.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnePasswordFacade.swift; sourceTree = "<group>"; };
B5609106208A54F800399AE4 /* WordPressXMLRPCAPIFacade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WordPressXMLRPCAPIFacade.h; sourceTree = "<group>"; };
B5609112208A555500399AE4 /* LoginTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginTextField.swift; sourceTree = "<group>"; };
B5609113208A555500399AE4 /* SearchTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchTableViewCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -337,8 +333,6 @@
BA53D64724DFDF97001F1ABF /* WordPressSourceTagTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WordPressSourceTagTests.swift; sourceTree = "<group>"; };
BA53D64A24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WordpressAuthenticatorProvider.swift; sourceTree = "<group>"; };
BA53D64C24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ModalViewControllerPresentingSpy.swift; sourceTree = "<group>"; };
BA53D64E24DFE981001F1ABF /* MockOnePasswordFacade.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockOnePasswordFacade.swift; sourceTree = "<group>"; };
BA53D65224DFEA58001F1ABF /* OnePasswordResultsFetcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnePasswordResultsFetcher.swift; sourceTree = "<group>"; };
BA70352324F70C9F00B3AA1C /* ModalViewControllerPresenting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalViewControllerPresenting.swift; sourceTree = "<group>"; };
C736FF243DE333FCAB1C2614 /* Pods_WordPressAuthenticator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WordPressAuthenticator.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CE16177421B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordPressAuthenticatorDisplayStrings.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -666,8 +660,6 @@
B5609103208A54F800399AE4 /* LoginFacade.h */,
B5609100208A54F800399AE4 /* LoginFacade.m */,
F1AF1BEE24E4A80F00BA453E /* LoginFacade.swift */,
B5609105208A54F800399AE4 /* OnePasswordFacade.swift */,
BA53D65224DFEA58001F1ABF /* OnePasswordResultsFetcher.swift */,
B5609104208A54F800399AE4 /* SafariCredentialsService.swift */,
B56090FE208A54F700399AE4 /* SignupService.swift */,
CE1B18C820EEC2C200BECC3F /* SocialService.swift */,
Expand Down Expand Up @@ -821,7 +813,6 @@
BA53D64924DFE06C001F1ABF /* Mocks */ = {
isa = PBXGroup;
children = (
BA53D64E24DFE981001F1ABF /* MockOnePasswordFacade.swift */,
BA53D64C24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift */,
BA53D64A24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift */,
D85C36EB256E10EA00D56E34 /* MockNavigationController.swift */,
Expand Down Expand Up @@ -1138,7 +1129,6 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-WordPressAuthenticatorTests/Pods-WordPressAuthenticatorTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/1PasswordExtension/OnePasswordExtension.framework",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/AppAuth/AppAuth.framework",
"${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework",
Expand All @@ -1162,7 +1152,6 @@
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OnePasswordExtension.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppAuth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework",
Expand Down Expand Up @@ -1236,7 +1225,6 @@
B560913E208A563800399AE4 /* SigninEditingState.swift in Sources */,
CE2D03E024E5DD4500D18942 /* UnifiedSignupViewController.swift in Sources */,
98CF18F7248725370047B66C /* GoogleSignupConfirmationViewController.swift in Sources */,
BA53D65324DFEA58001F1ABF /* OnePasswordResultsFetcher.swift in Sources */,
1A21EE9822832BC300C940C6 /* WordPressComOAuthClientFacade+Swift.swift in Sources */,
D87F120B2586DA26005675C5 /* SpacerTableViewCell.swift in Sources */,
CEC77C6624854F2E00FB9050 /* SiteAddressViewController.swift in Sources */,
Expand Down Expand Up @@ -1265,7 +1253,6 @@
CE6BCD3824A3CB5E001BCDC5 /* TextLinkButtonTableViewCell.swift in Sources */,
CE16177521B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift in Sources */,
CE1B18CE20EEC3CB00BECC3F /* WordPressAuthenticatorDelegateProtocol.swift in Sources */,
B5609110208A54F800399AE4 /* OnePasswordFacade.swift in Sources */,
F180B82424F59263000A01F5 /* StoredCredentialsPicker.swift in Sources */,
D881A311256B5B4700FE5605 /* NavigateToEnterSite.swift in Sources */,
B5609109208A54F800399AE4 /* SignupService.swift in Sources */,
Expand Down Expand Up @@ -1322,7 +1309,6 @@
BA53D64D24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift in Sources */,
BA53D64624DFDE1D001F1ABF /* CredentialsTests.swift in Sources */,
D85C36EC256E10EA00D56E34 /* MockNavigationController.swift in Sources */,
BA53D64F24DFE981001F1ABF /* MockOnePasswordFacade.swift in Sources */,
3F550D4E23DA429B007E5897 /* AppSelectorTests.swift in Sources */,
BA53D64B24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift in Sources */,
CE16177821B70C1A00B82A47 /* WordPressAuthenticatorDisplayTextTests.swift in Sources */,
Expand Down
36 changes: 0 additions & 36 deletions WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -465,42 +465,6 @@ import WordPressKit
// Otherwise, the default bundle is used for resources
return defaultBundle
}

// MARK: - 1Password Helper

/// Request credentails from 1Password (if supported)
///
/// - Parameter sender: A UIView. Typically the button the user tapped on.
///
class func fetchOnePasswordCredentials(_ controller: UIViewController,
sourceView: UIView,
loginFields: LoginFields,
allowUsernameChange: Bool = true,
onePasswordFetcher: OnePasswordResultsFetcher = OnePasswordFacade(),
success: @escaping ((_ loginFields: LoginFields) -> Void)) {

let loginURL = loginFields.meta.userIsDotCom ? OnePasswordDefaults.dotcomURL : loginFields.siteAddress

onePasswordFetcher.findLogin(for: loginURL, viewController: controller, sender: sourceView, success: { (username, password, otp) in
if allowUsernameChange {
loginFields.username = username
}

loginFields.password = password
loginFields.multifactorCode = otp ?? String()

WordPressAuthenticator.track(.onePasswordLogin)
success(loginFields)

}, failure: { error in
guard error != .cancelledByUser else {
return
}

DDLogError("OnePassword Error: \(error.localizedDescription)")
WordPressAuthenticator.track(.onePasswordFailed)
})
}
}

public extension WordPressAuthenticator {
Expand Down
7 changes: 0 additions & 7 deletions WordPressAuthenticator/Extensions/UIImage+Assets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ extension UIImage {
return UIImage(named: "site-address", in: bundle, compatibleWith: nil) ?? UIImage()
}

/// Returns the Default Gravatar Placeholder Image.
///
@objc
public static var onePasswordImage: UIImage {
return UIImage(named: "onepassword-button", in: bundle, compatibleWith: nil) ?? UIImage()
}

/// Returns the Link Image.
///
@objc
Expand Down
46 changes: 0 additions & 46 deletions WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,52 +40,6 @@ extension WPStyleGuide {
view.backgroundColor = wordPressBlue()
}

/// Adds a 1password button to a WPWalkthroughTextField, if available
/// - Note: this is for the old UI.
///
class func configureOnePasswordButtonForTextfield(_ textField: WPWalkthroughTextField, target: NSObject, selector: Selector) {
guard OnePasswordFacade.isOnePasswordEnabled else {
return
}

let onePasswordButton = UIButton(type: .custom)
onePasswordButton.setImage(.onePasswordImage, for: .normal)
textField.tintColor = WordPressAuthenticator.shared.style.secondaryNormalBorderColor
onePasswordButton.sizeToFit()

onePasswordButton.accessibilityLabel =
NSLocalizedString("Fill with password manager", comment: "The password manager button in login pages. The button opens a dialog showing which password manager to use (e.g. 1Password, LastPass). ")

textField.rightView = onePasswordButton
textField.rightViewMode = .always

onePasswordButton.addTarget(target, action: selector, for: .touchUpInside)
}

/// Adds a 1password button to a stack view, if available
/// - Note: this is for the old UI.
///
class func configureOnePasswordButtonForStackView(_ stack: UIStackView, target: NSObject, selector: Selector) {
guard OnePasswordFacade.isOnePasswordEnabled else {
return
}

let onePasswordButton = UIButton(type: .custom)
onePasswordButton.setImage(.onePasswordImage, for: .normal)
onePasswordButton.tintColor = WordPressAuthenticator.shared.style.secondaryNormalBorderColor
onePasswordButton.sizeToFit()
onePasswordButton.setContentHuggingPriority(.required, for: .horizontal)
onePasswordButton.setContentCompressionResistancePriority(.required, for: .horizontal)

onePasswordButton.accessibilityTraits = .button
onePasswordButton.accessibilityLabel = NSLocalizedString("One Password button", comment: "Accessibility label for 1 password button")
onePasswordButton.accessibilityHint = NSLocalizedString("Opens One Password manager", comment: "Accessibility hint for 1 password button")

stack.addArrangedSubview(onePasswordButton)

onePasswordButton.addTarget(target, action: selector, for: .touchUpInside)
}

/// Configures a plain text button with default styles.
///
class func configureTextButton(_ button: UIButton) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}

This file was deleted.

Loading