Instance Method

credentialsForProtectionSpace:

Returns a dictionary containing the credentials for the specified protection space.

Declaration

- (NSDictionary<NSString *,NSURLCredential *> *)credentialsForProtectionSpace:(NSURLProtectionSpace *)space;

Parameters

space

The protection space whose credentials you want to retrieve.

Return Value

A dictionary containing the credentials for the specified protection space. The dictionary’s keys are user name strings, and each value is the corresponding NSURLCredential.

Discussion

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

See Also

Retrieving Credentials

allCredentials

The credentials for all available protection spaces.

- getCredentialsForProtectionSpace:task:completionHandler:

Gets a dictionary containing the credentials for the specified protection space, on behalf of the given task, and passes the dictionary to the provided completion handler.