Vasilis

logout call added

......@@ -301,6 +301,8 @@ WL_VERSION_INTERFACE()
- (void)loginWithSuccessBlock:(NSString*)id andPassword:(NSString*)password andLoginType:(NSString*)loginType :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (NSDictionary*)logout;
- (void)webAuthorizeWithSuccessBlock:(NSDictionary*)contextResponse andId:(NSString*)id andLoginType:(NSString*)loginType :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
- (void)tokenWithSuccessBlock:(NSDictionary*)contextResponse andClientId:(NSString*)clientId andClientSecret:(NSString*)clientSecret andLoginType:(NSString*) loginType :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure;
......
......@@ -576,6 +576,14 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
}];
}
- (NSDictionary*)logout
{
[_db executeUpdate:@"DROP TABLE requestVariables"];
NSDictionary *successResponse = @{@"result": @"success", @"status":@1};
return successResponse;
}
- (void)webAuthorizeWithSuccessBlock:(NSDictionary*)contextResponse andId:(NSString*)id andLoginType:(NSString*)loginType :(void(^)(NSDictionary *response))success failureBlock:(void(^)(NSError *error))failure
{
if ([[contextResponse objectForKey:@"status"] isEqual:@1]) {
......
......@@ -365,6 +365,12 @@ NSString *LANG;
return resp;
}
- (NSDictionary *)logout {
NSDictionary *response = [NSDictionary alloc];
response = [[Warply sharedService] logout];
return response;
}
- (NSDictionary *)register:(NSString *)id password:(NSString *)password name:(NSString*)name email:(NSString*)email segmentation:(NSNumber*)segmentation newsletter:(NSNumber*)newsletter {
__block NSDictionary *resp = [NSDictionary alloc];
__block BOOL isRunLoopNested = NO;
......