CFHTTPAuthentication

The CFHTTPAuthentication opaque type provides an abstraction of HTTP authentication information.

Symbols

Creating an HTTP authentication

func CFHTTPAuthenticationCreateFromResponse(CFAllocator?, CFHTTPMessage)

Uses an authentication failure response to create a CFHTTPAuthentication object.

CFHTTP Authentication Functions

This section describes the CFNetwork authentication functions that are used to manage authentication information associated with a request. The functions work with a CFHTTPAuthentication object, which is created from an HTTP response that failed with a 401 or 407 error code.

When you have analyzed the CFHTTPAuthentication object and acquired the necessary credentials to perform the authentication, call CFHTTPMessageApplyCredentials(_:_:_:_:_:) or CFHTTPMessageApplyCredentialDictionary(_:_:_:_:) to perform the authentication.

func CFHTTPAuthenticationAppliesToRequest(CFHTTPAuthentication, CFHTTPMessage)

Returns a Boolean value that indicates whether a CFHTTPAuthentication object is associated with a CFHTTPMessage object.

func CFHTTPAuthenticationCopyDomains(CFHTTPAuthentication)

Returns an array of domain URLs to which a given CFHTTPAuthentication object can be applied.

func CFHTTPAuthenticationCopyMethod(CFHTTPAuthentication)

Gets the strongest authentication method that will be used when a CFHTTPAuthentication object is applied to a request.

func CFHTTPAuthenticationCopyRealm(CFHTTPAuthentication)

Gets an authentication information’s namespace.

func CFHTTPAuthenticationIsValid(CFHTTPAuthentication, UnsafeMutablePointer<CFStreamError>?)

Returns a Boolean value that indicates whether a CFHTTPAuthentication object is valid.

func CFHTTPAuthenticationRequiresAccountDomain(CFHTTPAuthentication)

Returns a Boolean value that indicates whether a CFHTTPAuthentication object uses an authentication method that requires an account domain.

func CFHTTPAuthenticationRequiresOrderedRequests(CFHTTPAuthentication)

Returns a Boolean value that indicates whether authentication requests should be made one at a time.

func CFHTTPAuthenticationRequiresUserNameAndPassword(CFHTTPAuthentication)

Returns a Boolean value that indicates whether a CFHTTPAuthentication object uses an authentication method that requires a username and a password.

Getting the CFHTTPAuthentication type ID

func CFHTTPAuthenticationGetTypeID()

Gets the Core Foundation type identifier for the CFHTTPAuthentication opaque type.

Data Types

CFHTTPAuthentication

An opaque reference representing HTTP authentication information.

Constants

CFHTTP Authentication Scheme Constants

Specifies the authentication scheme when adding authentication information to a CFHTTP request message object.

CFStreamErrorHTTPAuthentication

Authentication error codes that may be returned when trying to apply authentication to a request.