Manos Chorianopoulos

set live header for getCosmoteUser

......@@ -4960,8 +4960,10 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
//Set HTTP Headers
// DEV: MWlTM0EyNjcxT2Q0a1B5QkIydEs1ZU5uRENhR0NWQjQ6MjI4MjA4ZTliMTQzNGQ2MmIxNGI3ZDAzYjM2ZjUwMzg=
// LIVE: MVBQNFhCQzhFYTJBaUdCNkJWZGFGUERlTTNLQ3kzMjU6YzViMzAyZDY5N2FiNGY3NzhiNThhMTg0YzBkZWRmNGU=
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
[_httpClient.requestSerializer setValue:[@"Basic " stringByAppendingString:@"MWlTM0EyNjcxT2Q0a1B5QkIydEs1ZU5uRENhR0NWQjQ6MjI4MjA4ZTliMTQzNGQ2MmIxNGI3ZDAzYjM2ZjUwMzg="] forHTTPHeaderField:@"Authorization"];
[_httpClient.requestSerializer setValue:[@"Basic " stringByAppendingString:@"MVBQNFhCQzhFYTJBaUdCNkJWZGFGUERlTTNLQ3kzMjU6YzViMzAyZDY5N2FiNGY3NzhiNThhMTg0YzBkZWRmNGU="] forHTTPHeaderField:@"Authorization"];
[_httpClient.requestSerializer setValue:_webId forHTTPHeaderField:@"loyalty-web-id"];
[_httpClient.requestSerializer setValue:[NSString stringWithFormat:@"%lu", timestamp] forHTTPHeaderField:@"loyalty-date"];
[_httpClient.requestSerializer setValue:[[NSString stringWithFormat:@"%@%lu", _apiKey, timestamp] SHA256Sum] forHTTPHeaderField:@"loyalty-signature"];
......