Swiftgram/Classes/BITAuthenticator_Private.h
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

87 lines
2.9 KiB
Objective-C

//
// BITAuthenticator_Private.h
// HockeySDK
/*
* Author: Stephan Diederich
*
* Copyright (c) 2013 HockeyApp, Bit Stadium GmbH.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#import "BITAuthenticator.h"
#import "BITHockeyBaseManagerPrivate.h"
#import "BITAuthenticationViewController.h"
@class BITHockeyAppClient;
@interface BITAuthenticator ()<BITAuthenticationViewControllerDelegate>
/**
* must be set
*/
@property (nonatomic, strong) BITHockeyAppClient *hockeyAppClient;
#pragma mark -
/**
* holds the identifier of the last version that was authenticated
* only used if validation is set BITAuthenticatorValidationTypeOnFirstLaunch
*/
@property (nonatomic, copy) NSString *lastAuthenticatedVersion;
/**
* return the string used to identify this app against the HockeyApp backend.
*/
@property (nonatomic, copy, readonly) NSString *installationIdentifierTypeString;
/**
* returns the string used to identify this app against the HockeyApp backend.
*/
@property (nonatomic, copy, readonly) NSString *installationIdentifier;
/**
* method registered as observer for applicationWillBecomeInactive events
*
* @param note NSNotification
*/
- (void) applicationWillResignActive:(NSNotification*) note;
/**
* method registered as observer for applicationsDidBecomeActive events
*
* @param note NSNotification
*/
- (void) applicationDidBecomeActive:(NSNotification*) note;
@property (nonatomic, copy) void(^identificationCompletion)(BOOL identified, NSError* error);
#pragma mark - Overrides
@property (nonatomic, assign, readwrite, getter = isIdentified) BOOL identified;
@property (nonatomic, assign, readwrite, getter = isValidated) BOOL validated;
#pragma mark - Testing
- (void) storeInstallationIdentifier:(NSString*) identifier withType:(BITAuthenticatorIdentificationType) type;
- (BOOL) needsValidation;
- (void) authenticate;
@end