Instance Method

defaultCredentialForProtectionSpace:

Returns the default credential for the specified protection space.

Declaration

- (NSURLCredential *)defaultCredentialForProtectionSpace:(NSURLProtectionSpace *)space;

Parameters

space

The URL protection space of interest.

Return Value

The default credential for space or nil if no default has been set.

Discussion

If you override this method, also override getDefaultCredentialForProtectionSpace:task:completionHandler:.

See Also

Getting and Setting Default Credentials

- 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:

Sets the default credential for a specified protection space.

- setDefaultCredential:forProtectionSpace:task:

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