This repository was archived by the owner on Feb 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +59
-3
lines changed
WordPressAuthenticator/Navigation Expand file tree Collapse file tree 4 files changed +59
-3
lines changed Original file line number Diff line number Diff line change 99 - SVProgressHUD (2.2.5)
1010 - SwiftLint (0.49.1)
1111 - UIDeviceIdentifier (2.2.0)
12- - WordPressAuthenticator (7.0 .0):
12+ - WordPressAuthenticator (7.1 .0):
1313 - Gridicons (~> 1.0)
1414 - "NSURL+IDN (= 0.4)"
1515 - SVProgressHUD (~> 2.2.5)
@@ -71,7 +71,7 @@ SPEC CHECKSUMS:
7171 SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
7272 SwiftLint: 32ee33ded0636d0905ef6911b2b67bbaeeedafa5
7373 UIDeviceIdentifier: f33af270ba9045ea18b31d9aab88e42a0082ea67
74- WordPressAuthenticator: 6ae29636e22143b6237a841708713b308503d10c
74+ WordPressAuthenticator: f73ba530531bb14eedd2f2b69c9b2d387004026c
7575 WordPressKit: 8e1c5a64645a59493a7316f38468ac036de9c79b
7676 WordPressShared: 0aa459e5257a77184db87805a998f447443c9706
7777 WordPressUI: 1cf47a3b78154faf69caa18569ee7ece1e510fa0
Original file line number Diff line number Diff line change 22
33Pod ::Spec . new do |s |
44 s . name = 'WordPressAuthenticator'
5- s . version = '7.0 .0'
5+ s . version = '7.1 .0'
66
77 s . summary = 'WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps.'
88 s . description = <<-DESC
Original file line number Diff line number Diff line change 1+ import Foundation
2+
3+ /// Navigates to the wp-admin site credentials flow.
4+ ///
5+ public struct NavigateToEnterSiteCredentials : NavigationCommand {
6+ private let loginFields : LoginFields
7+
8+ public init ( loginFields: LoginFields ) {
9+ self . loginFields = loginFields
10+ }
11+ public func execute( from: UIViewController ? ) {
12+ let navigationController = ( from as? UINavigationController ) ?? from? . navigationController
13+ presentSiteCredentialsView ( navigationController: navigationController,
14+ loginFields: loginFields)
15+ }
16+ }
17+
18+ private extension NavigateToEnterSiteCredentials {
19+ func presentSiteCredentialsView( navigationController: UINavigationController ? , loginFields: LoginFields ) {
20+ guard let controller = SiteCredentialsViewController . instantiate ( from: . siteAddress) else {
21+ WPAuthenticatorLogError ( " Failed to navigate to SiteCredentialsViewController " )
22+ return
23+ }
24+
25+ controller. loginFields = loginFields
26+ navigationController? . pushViewController ( controller, animated: true )
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ import Foundation
2+
3+ /// Navigates to the WPCOM password flow.
4+ ///
5+ public struct NavigateToEnterWPCOMPassword : NavigationCommand {
6+ private let loginFields : LoginFields
7+
8+ public init ( loginFields: LoginFields ) {
9+ self . loginFields = loginFields
10+ }
11+ public func execute( from: UIViewController ? ) {
12+ let navigationController = ( from as? UINavigationController ) ?? from? . navigationController
13+ presentPasswordView ( navigationController: navigationController,
14+ loginFields: loginFields)
15+ }
16+ }
17+
18+ private extension NavigateToEnterWPCOMPassword {
19+ func presentPasswordView( navigationController: UINavigationController ? , loginFields: LoginFields ) {
20+ guard let controller = PasswordViewController . instantiate ( from: . password) else {
21+ WPAuthenticatorLogError ( " Failed to navigate to PasswordViewController from GetStartedViewController " )
22+ return
23+ }
24+
25+ controller. loginFields = loginFields
26+ navigationController? . pushViewController ( controller, animated: true )
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments