Function

CFHTTPAuthenticationIsValid

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

Declaration

Boolean CFHTTPAuthenticationIsValid(CFHTTPAuthenticationRef auth, CFStreamError *error);

Parameters

auth

The CFHTTPAuthentication object to examine.

error

Pointer to a CFStreamError structure, whose fields, if an error has occurred, are set to the error and the error’s domain.

Return Value

TRUE if auth contains enough information to be applied to a request.

If this function returns FALSE, the CFHTTPAuthentication object may still contain useful information, such as the name of an unsupported authentication method.

Discussion

If this function returns TRUE for auth, the object is good for use with functions such as CFHTTPMessageApplyCredentials and CFHTTPMessageApplyCredentialDictionary. If this function returns FALSE, auth is invalid, and authentications using it will not succeed.

See Also

HTTP Authentication

CFHTTPAuthenticationRef

An opaque reference representing HTTP authentication information.

CFHTTPAuthenticationAppliesToRequest

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

CFHTTPAuthenticationCopyDomains

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

CFHTTPAuthenticationCopyMethod

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

CFHTTPAuthenticationCopyRealm

Gets an authentication information’s namespace.

CFHTTPAuthenticationCreateFromResponse

Uses an authentication failure response to create a CFHTTPAuthentication object.

CFHTTPAuthenticationGetTypeID

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

CFHTTPAuthenticationRequiresAccountDomain

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

CFHTTPAuthenticationRequiresOrderedRequests

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

CFHTTPAuthenticationRequiresUserNameAndPassword

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

kCFHTTPAuthenticationAccountDomain

Account domain to use for authentication.

kCFHTTPAuthenticationPassword

Password to use for authentication.

kCFHTTPAuthenticationSchemeBasic

Request the HTTP basic authentication scheme.

kCFHTTPAuthenticationSchemeDigest

Request the HTTP digest authentication scheme.

kCFHTTPAuthenticationSchemeKerberos

Request the HTTP Kerberos authentication scheme.

kCFHTTPAuthenticationSchemeNTLM

Request the HTTP NTLM authentication scheme.

kCFHTTPAuthenticationSchemeNegotiate

Request the HTTP Negotiate authentication scheme.

kCFHTTPAuthenticationSchemeNegotiate2

Request the HTTP Negotiate v2 authentication scheme.

kCFHTTPAuthenticationSchemeXMobileMeAuthToken

Request the HTTP XMobileMeAuthToken authentication scheme.

kCFHTTPAuthenticationUsername

Username to use for authentication.