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

Auth: request a token without an API key, authCallback or authUrl #117

Closed
ricardopereira opened this issue Dec 31, 2015 · 0 comments
Closed
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@ricardopereira
Copy link
Contributor

Authentication (RSC14c) When a token or tokenDetails is used to instance the library, and no means to renew the token is provided (either an API key, authCallback or authUrl), if the server responds with 40140 (token expired) to a request, the client library should indicate an error and not retry the request.

The spec is not implemented yet.
IMO the error should be different:

Error Domain=io.ably.cocoa Code=40400 "" UserInfo={NSLocalizedFailureReason=Could not find path: /keys/(null)/requestToken, ARTErrorStatusCode=404, NSLocalizedDescription=}

It is not obvious that the client was initialised with a token/tokenDetails and that is why a new token was not retrieved.

@ricardopereira ricardopereira added bug Something isn't working. It's clear that this does need to be fixed. rest labels Dec 31, 2015
ricardopereira added a commit that referenced this issue Sep 26, 2016
ricardopereira added a commit that referenced this issue Sep 27, 2016
* Test suite: add `testSuite_waitForConnectionToClose`

* Fix testMultipleText_1000_10: increase timeout

* A few fixes in tests.

* Fix connection broken after connection is closed: should wait for the publishing acknowledgement

* Fix spec tests: expects `done` completion closure to only be called once

* Fix: decode each REST presence message data

* Fix RSP5

* Fix: should error if authUrl request is returning incompatible data

* Fix RTP8h, RTP9e, RTP10e: token with clientId

* Fix RTN17e: already closed

* RTC8: pending

* Fix #117 test: add delay

* Enhance RTP5b: wait for presence of Client2

 - sometimes was passing, sometimes not

* Fix InvalidNimbleAPIUsage: nested async expectations are not allowed to avoid creating flaky tests
ricardopereira added a commit that referenced this issue Sep 27, 2016
* Test suite: add `testSuite_waitForConnectionToClose`

* Fix testMultipleText_1000_10: increase timeout

* Fix connection broken after connection is closed: should wait for the publishing acknowledgement

* Fix spec failures (#506)

* Test suite: add `testSuite_waitForConnectionToClose`

* Fix testMultipleText_1000_10: increase timeout

* A few fixes in tests.

* Fix connection broken after connection is closed: should wait for the publishing acknowledgement

* Fix spec tests: expects `done` completion closure to only be called once

* Fix: decode each REST presence message data

* Fix RSP5

* Fix: should error if authUrl request is returning incompatible data

* Fix RTP8h, RTP9e, RTP10e: token with clientId

* Fix RTN17e: already closed

* RTC8: pending

* Fix #117 test: add delay

* Enhance RTP5b: wait for presence of Client2

 - sometimes was passing, sometimes not

* Fix InvalidNimbleAPIUsage: nested async expectations are not allowed to avoid creating flaky tests
maratal pushed a commit that referenced this issue Jul 19, 2023
Replace amber background with slate for `code` elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

No branches or pull requests

1 participant