Instance Method

setDefaultCredential:forProtectionSpace:

Sets the default credential for a specified protection space.

Declaration

- (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space;

Parameters

credential

The URL credential to set as the default for space. If the receiver does not contain credential in the specified protection space it will be added.

space

The protection space whose default credential is being set.

Discussion

If you override this method, also override setDefaultCredential:forProtectionSpace:task:.

See Also

Getting and Setting Default Credentials

- defaultCredentialForProtectionSpace:

Returns the default credential for the specified protection space.

- getDefaultCredentialForProtectionSpace:task:completionHandler:

Gets the default credential for the specified protection space, which is being accessed by the given task, and passes it to the provided completion handler.

- setDefaultCredential:forProtectionSpace:task:

Sets the default credential for a given protection space, which is being accessed by the given task.