mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-06 20:32:56 +02:00
fixing bugs
This commit is contained in:
parent
9835f16821
commit
f7333e90d8
3 changed files with 3 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
|||
- (void) confirmCredentials:(NSString*)username :(NSString*)password {
|
||||
|
||||
NSLog(@"web request started");
|
||||
NSString *post = [NSString stringWithFormat:@"grant_type=password&username=%@&password=%@&scope=owner", username, password];
|
||||
NSString *post = [NSString stringWithFormat:@"grant_type=password&username=%@&password=%@&scope=owner", username, [password stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet symbolCharacterSet]]];
|
||||
NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSString *postLength = [NSString stringWithFormat:@"%ld", (unsigned long)[postData length]];
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
|||
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
|
||||
[request setHTTPBody:postData];
|
||||
|
||||
//NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
|
||||
NSURLSession* session = [NSURLSession sharedSession];
|
||||
NSURLSessionDataTask* dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
[fileManager moveItemAtURL:location toURL:destinationURL error:&error];
|
||||
|
||||
Launcher* sharedLauncher = [Launcher sharedLauncher];
|
||||
[sharedLauncher setDownloadFilename:destinationFileName];
|
||||
NSString* appPath = [sharedLauncher getAppPath];
|
||||
NSString* downloadFileName = [sharedLauncher getDownloadFilename];
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ static NSString* const organizationURL = @"https://s3.amazonaws.com/hifi-public/
|
|||
self.username = aUsername;
|
||||
|
||||
const char *cKey = LAUNCHER_HMAC_SECRET;
|
||||
const char *cData = [aOrganization cStringUsingEncoding:NSASCIIStringEncoding];
|
||||
const char *cData = [[aOrganization lowercaseString] cStringUsingEncoding:NSASCIIStringEncoding];
|
||||
unsigned char cHMAC[CC_SHA256_DIGEST_LENGTH];
|
||||
CCHmac(kCCHmacAlgSHA256, cKey, strlen(cKey), cData, strlen(cData), cHMAC);
|
||||
NSData *HMACData = [NSData dataWithBytes:cHMAC length:sizeof(cHMAC)];
|
||||
|
@ -33,7 +33,6 @@ static NSString* const organizationURL = @"https://s3.amazonaws.com/hifi-public/
|
|||
[sharedLauncher setLoginErrorState: NONE];
|
||||
return [sharedLauncher organizationRequestFinished:TRUE];
|
||||
}
|
||||
NSLog(@"FAAAAILLLLLLLEEEEEEEDDDDDD");
|
||||
[sharedLauncher setLoginErrorState: ORGANIZATION];
|
||||
return [sharedLauncher organizationRequestFinished:FALSE];
|
||||
/*NSLog(@"URL: %@", [organizationURL stringByAppendingString:jsonFile]);
|
||||
|
|
Loading…
Reference in a new issue