-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: limited v7 API integration with individual to team migration endpoint - WPB-11961 #2151
base: feat/individual-to-team-migration-ui
Are you sure you want to change the base?
feat: limited v7 API integration with individual to team migration endpoint - WPB-11961 #2151
Conversation
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit d85246c. ♻️ This comment has been updated with latest results. |
@@ -0,0 +1,42 @@ | |||
{ |
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.
question: do we need to add this one, as we always use WireAPI within monorepo Xcode workspace
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.
We can add it to .gitignore.
It's just automatically generated when we open the module using Xcode.
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.
Should I add it to .gitignore?
WireAPI/Sources/WireAPI/APIs/AccountsAPI/Responses/UpgradeToTeamResponseEnvelopeV7.swift
Outdated
Show resolved
Hide resolved
WireAPI/Sources/WireAPI/Models/Accounts/UpgradeAccountEnvelope.swift
Outdated
Show resolved
Hide resolved
|
||
public struct IndividualToTeamMigrationUseCase { | ||
private let accountsAPI: AccountsAPI | ||
private let logger: WireLogger = WireLogger(tag: "individual-to-team-migration") |
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 a static one like WireLogger.individualToTeam
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.
?
WireDomain/Sources/WireDomain/UseCases/IndividualToTeamMigrationUseCaseImplementation.swift
Outdated
Show resolved
Hide resolved
@@ -42,6 +68,12 @@ open class AuthenticatedSessionFactory { | |||
reachability: Reachability, | |||
minTLSVersion: String? | |||
) { | |||
self.apiService = APIService( | |||
backendURL: environment.backendURL, | |||
// TODO: Use the authentication storage from https://github.com/wireapp/wire-ios/pull/2084 |
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.
👍
import WireDataModel | ||
|
||
|
||
final class InMemoryAuthenticationStorage: AuthenticationStorage { |
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.
I understand this is temporary too until renew access token PR is merged, right?
otherwise I would suggest to move to own file
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.
There already is an InMemoryAuthenticationStorage
so feel free to make it public and use it here.
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.
It's exactly the same code, just copy-pasted.
And it is temporary until the renew access token PR is merged.
@johnxnguyen Do we want the InMemoryAuthentication
to be and remain public?
@@ -30,6 +30,23 @@ public enum TLSVersion { | |||
|
|||
case v1_3 | |||
|
|||
public static func minVersionFrom(_ string: String?) -> TLSVersion { |
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.
I am not sure to see how this is related to this PR, is it for something further
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.
The APIService needs a WireAPI.TLSVersion
.
The AuthenticatedSessionFactory
has one, but as a String.
The WireAPI.TLSVersion
had no way of being instantiated using a String.
So Monday I asked if I should port the WireTransport.TLSVersion
init logic to WireAPI.TLSVersion
, and was told I indeed should.
WireAPI/Sources/WireAPI/APIs/AccountsAPI/Responses/UpgradeToTeamResponseEnvelopeV7.swift
Outdated
Show resolved
Hide resolved
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.
Looks good, I'll wait for the conversations to be resolved before approving.
WireAPI/Sources/WireAPI/APIs/AccountsAPI/AccountsAPIBuilder.swift
Outdated
Show resolved
Hide resolved
WireAPI/Sources/WireAPI/APIs/AccountsAPI/AccountsAPIError.swift
Outdated
Show resolved
Hide resolved
WireAPI/Sources/WireAPI/Models/Accounts/UpgradeAccountEnvelope.swift
Outdated
Show resolved
Hide resolved
WireAPI/Sources/WireAPI/Models/Accounts/UpgradeAccountEnvelope.swift
Outdated
Show resolved
Hide resolved
WireAPI/Sources/WireAPI/Models/Accounts/UpgradeAccountEnvelope.swift
Outdated
Show resolved
Hide resolved
import WireDataModel | ||
|
||
|
||
final class InMemoryAuthenticationStorage: AuthenticationStorage { |
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.
There already is an InMemoryAuthenticationStorage
so feel free to make it public and use it here.
12300f5
to
7ebdca4
Compare
aa88e45
to
d85246c
Compare
Issue
Please describe the issue.
A barebones v7 API integration, limited to adding the individual to team migration endpoint, using
APIService
Checklist
[WPB-XXX]
.UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: