Uses an authentication failure response to create a CFHTTPAuthentication object.
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
The allocator to use to allocate memory for the new object. Pass
NULLor kCFAllocatorDefault to use the current default allocator.
Response indicating an authentication failure; usually a 401 or a 407 response.
CFHTTPAuthentication object that can be used for adding credentials to future requests. Ownership follows the The Create Rule.
This function uses a response containing authentication failure information to create a reference to a CFHTTPAuthentication object. You can use the object to add credentials to future requests. You can query the object to get the following information:
whether it can be used and re-used to authenticate with its corresponding server [
the authentication method that will be used when it is used to perform an authentication [
whether it is associated with a particular CFHTTPMessageRef [
Applies To Request
whether a user name and a password will be required when it is used to perform an authentication [
Requires User Name And Password
whether an account domain will be required when it is used to perform an authentication [
Requires Account Domain
whether authentication requests should be sent one at a time to the corresponding server [
Requires Ordered Requests
the namespace (if any) that the domain uses to prompt for a name and password [
the domain URLs the instance applies to [
When you have determined what information will be needed to perform the authentication and accumulated that information, call
CFHTTPMessage to perform the authentication.