Ben Copsey

Merge branch 'auth-tweaks' into integration

This diff is collapsed. Click to expand it.
... ... @@ -1087,6 +1087,16 @@
err = [request error];
GHAssertNil(err,@"Failed to reuse credentials");
// Ensure new credentials are used in place of those in the session
request = [[[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/basic-authentication-new-credentials"]] autorelease];
[request setUsername:@"secret_username_2"];
[request setPassword:@"secret_password_2"];
[request setUseSessionPersistence:YES];
[request setUseKeychainPersistence:NO];
[request startSynchronous];
err = [request error];
GHAssertNil(err,@"Failed to reuse credentials");
[ASIHTTPRequest clearSession];
// Ensure credentials stored in the session were wiped
... ... @@ -1103,7 +1113,7 @@
err = [request error];
GHAssertNil(err,@"Failed to use stored credentials");
[ASIHTTPRequest removeCredentialsForHost:@"allseeing-i.com" port:0 protocol:@"http" realm:@"SECRET_STUFF"];
[ASIHTTPRequest removeCredentialsForHost:@"asi" port:0 protocol:@"http" realm:@"SECRET_STUFF"];
// Ensure credentials stored in the keychain were wiped
request = [[[ASIHTTPRequest alloc] initWithURL:url] autorelease];
... ... @@ -1424,7 +1434,7 @@
{
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_to_new_domain"]];
[request startSynchronous];
BOOL success = [[[request url] absoluteString] isEqualToString:@"http://www.apple.com/"];
BOOL success = [[[request url] absoluteString] isEqualToString:@"http://www.apple.com"];
GHAssertTrue(success,@"Failed to redirect to a different domain");
}
... ...