Skip to content

Instantly share code, notes, and snippets.

View lkdocs's full-sized avatar

LaunchKey Documentation Examples lkdocs

View GitHub Profile
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [[LKAuthenticationManager sharedClient] handleOpenUrl:url];
}
return [[LKAuthenticationManager sharedClient] handleOpenUrl:url];
#import <LaunchKeyManager/LKAuthenticationManager.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
[[LKAuthenticationManager sharedClient]
init:appKey
withSecretKey:appSecret
withPrivateKey:privateKey];
[[LKAuthenticationManager sharedClient] authorize:@"username" withSuccess:^(NSString *userHash, NSString *authRequest, NSString *pins, NSString *deviceId
{
NSLog(@"success");
} withFailure:^(NSString *errorMessage, NSString *errorCode) {
NSLog(@"failure");
}];
[[LKAuthenticationManager sharedClient] authorize:@"username" isTransactional:TRUE withSuccess:^(NSString *userHash, NSString *authRequest, NSString *pins, NSString *deviceId
{
NSLog(@"success");
} withFailure:^(NSString *errorMessage, NSString *errorCode) {
NSLog(@"failure");
}];
[[LKAuthenticationManager sharedClient] isAuthorized:authRequest withSuccess:^(BOOL authorized) {
} withFailure:^(NSString *errorMessage, NSString *errorCode) {
}];
[[LKAuthenticationManager sharedClient] logout:authRequest withSuccess:^{
} withFailure:^(NSString *errorMessage, NSString *errorCode) {
}];
import com.LaunchKeyManager.LKAuthenticationManager;
LKAuthenticationManager.getInstance().init(appKey, appSecret, privateKey);