30 Commits

Author SHA1 Message Date
Andreas Linde
a0bfdfbaec Issue #85: Replace kNilOptions with 0
Thanks to Jonathan!
2014-01-10 02:27:51 +01:00
Andreas Linde
785f654060 Fixed static analyzer warnings for unit tests when running against 64 bit target 2013-12-04 02:19:37 +01:00
Philippe Casgrain
ed1b546384 Removed obsolete test
The user is now required to call `authenticateInstallation` manually, which obviates the need for this test.

Required call was implemented in 7052f0cd.
2013-12-03 16:25:43 +01:00
Philippe Casgrain
308ea14b6e Removed automaticMode from tests
automaticMode was removed in commit 498bd62cbb.
2013-11-29 15:46:31 +01:00
Stephan Diederich
28b08fa804 add "webAuth" identificationType 2013-10-11 17:18:04 +02:00
Stephan Diederich
00ad57b245 rename ivar
adjust name so that it's not that easy to confuse
it with the identificationType. This is only the type of
the identifier.
2013-10-11 17:18:01 +02:00
Stephan Diederich
79d6c41c5b remove isValid flag reset tests
it's currently not testable as the UIApplication
singleton is directly accessed
2013-09-26 16:01:09 +02:00
Stephan Diederich
1616403e61 update needsValidation
return YES even if already validated but
there's a version mismatch.
2013-09-24 14:05:04 +02:00
Stephan Diederich
c2c6558687 redo BITAuthenticator interface
given the good feedback we got, this is take 2
of the BITAuthenticator interface.
It's simplified, cleaned up and now allows full
control over the authentication process.
Major changes:
* manual mode
  Authenticator provides the bits to show the
  viewController to identify the user as well as to
  trigger validation on behalf of the developer.
* process separation
  identification and app-usage-restriction are now
  2 completely separated things.
* public identifier
  Authenticator now allows the developer to query
  parts of the information, e.g. the UDID or the user's
  emailaddy once identified
2013-09-23 23:15:56 +02:00
ipaterson
df7010ed8a Fixed recurring typo in manager initializers. 2013-09-23 13:39:59 -04:00
Andreas Linde
22047b856c Fixes for getting test coverage working again
Xcode 5 does not create .gcda files due to a bug. The workaround used in here has been suggested in the devforums: https://devforums.apple.com/thread/199643?start=0&tstart=0
2013-09-23 17:17:41 +02:00
ipaterson
16cc6d0df5 Updated -testThatCleanupWorks to ensure that didSkipOptionalLogin is set to YES before cleanup, otherwise the assertion that the value is NO after cleanup is merely testing its initialization to NO. 2013-09-20 13:27:59 -04:00
Stephan Diederich
c534e5d566 also reset auth token if authType changed
saves us a round-trip when validating, as when
the authType changed, server would return nope.
2013-09-11 16:46:07 +02:00
Stephan Diederich
378c4e91f5 fix tests for validation / authviewcontroller
bringing up authViewController again is handled by the default
completion block. So we need to pass it along
2013-09-11 14:55:23 +02:00
Stephan Diederich
ea5452603b store the type of the token with the token itself
updater needs it as well and we actually don't want to send
the wrong type to the server
2013-09-11 14:52:33 +02:00
Stephan Diederich
30b93a0468 only reauthenticate if validation failed 2013-09-11 00:05:22 +02:00
Stephan Diederich
34bf1bf611 add flag to tell if app is currently validated 2013-09-10 23:41:48 +02:00
Stephan Diederich
3144247dc9 in "optional"-mode, show authentication exactly once 2013-09-10 23:41:48 +02:00
Stephan Diederich
2886ac4d77 rename skip to cancel 2013-09-10 23:41:48 +02:00
Stephan Diederich
ebbe6dc0af use helper method from BITHelpers instead of home-brewed solution 2013-09-10 23:41:48 +02:00
Stephan Diederich
7c2e2b88a0 bail if secret is missing and we're trying to authenticate 2013-09-09 02:16:58 +02:00
Stephan Diederich
2d97ac7cf7 reset auth-token if identifierForVendor changed 2013-09-07 19:01:17 +02:00
Stephan Diederich
567b0def60 refactoring: move auth-logic to the authenticator
via a delegation-completionBlock-combo
2013-09-06 19:23:58 +02:00
Stephan Diederich
6c29a72a98 fix authenticator tests - initialize _NOT_ being in the appstore 2013-09-06 19:23:15 +02:00
Stephan Diederich
e784213184 cleanup Authenticator interface
* remove additional delegate methods
* remove validation/authentication calls from public interface
2013-09-06 18:01:29 +02:00
Stephan Diederich
6f64b8e5d6 make installationIdentification KVO'able 2013-09-06 17:24:01 +02:00
Stephan Diederich
96304ac639 factor out BITHockeyAppClient to provide network services
* factor out HockeyAppClient
* configure Authenticator with HockeyAppClient
* move appendPostValue to HockeyAppClient (& add the missing boundary parameter)
* move tests over to new file
2013-09-06 17:11:55 +02:00
Stephan Diederich
ff555cb87d refine validation logic 2013-08-15 22:30:39 +02:00
Stephan Diederich
039902da02 add networking helpers to BITAuthenticator
* NSOperation-based networking
* helpers for URLRequest, operation, getPath:error:
2013-08-11 22:42:31 +02:00
Stephan Diederich
017b8495a8 add BITAuthenticator
class to control authentication and validation of an installation.

TODO:
* AuthenticatorViewController
* validation
* hooking into BITHockeyManager
2013-08-09 12:23:37 +02:00