added Token Based Reconnection and tested everything #758
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@chrisballinger I implemented
Token Based Reconnection. DON'T MERGE YETHere is the documentation:
http://mongooseim.readthedocs.io/en/latest/open-extensions/token-reconnection/
http://www.xmpp.org/extensions/inbox/token-reconnection.html
There is something I can't find a way of implementing it, maybe you can give a clue:
When authenticating using TBR you send:
There are two types of tokens, the
Access tokenthat never changes and theRefresh Tokenthat is refreshed every time you send it to the server, so after sending the<auth>with aRefresh Tokenthe server will respond the following:And I need a way of being able to get that
new_refresh_token. The different ways I found of doing this are:id <XMPPSASLAuthentication> auth;from XMPPStream public (just the getter) and store thenew_refresh_tokenin the auth (XMPPTBRAuthentication) so I can do somethign like this in thexmppStreamDidAuthenticate:XMPPStream.hsomething like:And call that method from
- (void)handleAuth:(NSXMLElement *)authResponseinXMPPStream.mchecking ifauthis from typeXMPPTBRAuthenticationand grab thenew_refresh_tokenfrom theauthResponseWhat do you think???