-
Notifications
You must be signed in to change notification settings - Fork 191
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
#376 auth request service #385
Conversation
llbartekll
commented
Jul 29, 2022
•
edited
Loading
edited
- implements authRequestService
- adds auth granular tag
- implements networking interactor's request method
} | ||
} | ||
|
||
// TODO - temporarly duplicated - moved do utils in concurrent PR |
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 believe that, if this is moved to Utils, we'll have to expose it via a typealias
in each SDK. Remember to test it if you do
let issueAt = ISO8601DateFormatter().string(from: Date()) | ||
let payload = AuthPayload(requestParams: params, iat: issueAt) | ||
let params = AuthRequestParams(requester: requester, payloadParams: payload) | ||
let request = JSONRPCRequest<AuthRequestParams>(method: "wc_authRequest", params: params) |
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.
What do you think of using RPCRequest
in here? Seems like a good place to use it
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 was waiting for your first demo integration 😄 but ok, let's give it a shot.
class NetworkingInteractor: NetworkInteracting { | ||
private let relayClient: RelayClient | ||
private let serializer: Serializing | ||
private let jsonRpcHistory: JsonRpcHistory<AuthRequestParams> |
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.
As it was already merged to develop, what do you also think of using the improved RPCHistory
in here, so you can avoid binding the storage to a single specialized type?
Left some suggestions to incentivise scaling the service from the start. Also, the PR needs to run again in the CI (maybe rebase with develop) |