Skip to content
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

REST authCallback #33

Merged
merged 66 commits into from
Nov 6, 2020
Merged

REST authCallback #33

merged 66 commits into from
Nov 6, 2020

Conversation

tiholic
Copy link
Contributor

@tiholic tiholic commented Aug 8, 2020

Support for authCallback client option

Checklist

  • Android
  • iOS

How it works

  1. Rest instance will be created with authCallback in ClientOptions
  2. RestChannel#publish will be triggered from user code
  3. ably library code calls a proxy authCallback on platform code and that will immediately return null, but will make a platform call to dart side for a token data.
  4. dart side receives the MethodChannel call and calls authCallback and return the value to platform code.
  5. platform code will set this response token data in temporary storage.
  6. RestChannel#publish from #2 will receive a 80019 error which will suppress the error and will check a boolean on dart side if the authentication update was complete every 100ms and then retry publishing again.
  7. This time, platform code will return ably library with the token data stored temporarily in #5 above

@tiholic tiholic force-pushed the feature/connection-resume-failure branch from c61e063 to 5565a5f Compare August 18, 2020 05:51
@tiholic tiholic force-pushed the feature/token-authentication branch from a8ca3fd to 7984115 Compare August 18, 2020 06:09
@tiholic tiholic marked this pull request as ready for review August 25, 2020 14:22
@zoechi zoechi self-requested a review September 10, 2020 12:53
example/lib/provisioning.dart Outdated Show resolved Hide resolved
example/lib/provisioning.dart Outdated Show resolved Hide resolved
example/lib/provisioning.dart Outdated Show resolved Hide resolved
lib/src/codec.dart Show resolved Hide resolved
lib/src/method_call_handler.dart Show resolved Hide resolved
lib/src/impl/rest/rest.dart Outdated Show resolved Hide resolved
lib/src/spec/common.dart Show resolved Hide resolved
lib/src/spec/common.dart Outdated Show resolved Hide resolved
lib/src/spec/common.dart Outdated Show resolved Hide resolved
@tiholic tiholic force-pushed the feature/connection-resume-failure branch from d992307 to 34db0d2 Compare September 10, 2020 15:45
@tiholic tiholic force-pushed the feature/token-authentication branch from e0a9193 to 5e5334b Compare September 10, 2020 15:49
Copy link
Contributor

@QuintinWillison QuintinWillison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just focussed on the Java and Objective-C code for now, ignoring the generated stuff.

ios/Classes/AblyFlutter.h Outdated Show resolved Hide resolved
ios/Classes/AblyFlutter.h Outdated Show resolved Hide resolved
ios/Classes/AblyFlutterPlugin.m Outdated Show resolved Hide resolved
@tiholic tiholic force-pushed the feature/token-authentication branch from 5e5334b to 371cc79 Compare September 11, 2020 08:07
@zoechi zoechi mentioned this pull request Sep 11, 2020
6 tasks
tiholic added a commit that referenced this pull request Sep 17, 2020
Base automatically changed from feature/connection-resume-failure to main September 22, 2020 11:21
tiholic added a commit that referenced this pull request Sep 22, 2020
@tiholic tiholic force-pushed the feature/token-authentication branch from 25bda81 to 07a75a3 Compare September 22, 2020 11:27
@tiholic tiholic changed the title custom authentication with authCallback custom authentication with authCallback for publishing rest messages Sep 22, 2020
tiholic and others added 26 commits November 5, 2020 14:47
1. import flutter using @import
2. not returning instancetype from setChannel
@tiholic tiholic force-pushed the feature/token-authentication branch from 3a209cf to c5250cb Compare November 5, 2020 09:18
@QuintinWillison QuintinWillison merged commit f9a5d71 into main Nov 6, 2020
@QuintinWillison QuintinWillison deleted the feature/token-authentication branch November 6, 2020 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants