---
title: "CFHTTPAuthenticationAppliesToRequest(_:_:)"
framework: cfnetwork
role: symbol
role_heading: Function
path: "cfnetwork/cfhttpauthenticationappliestorequest(_:_:)"
---

# CFHTTPAuthenticationAppliesToRequest(_:_:)

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

## Declaration

```swift
func CFHTTPAuthenticationAppliesToRequest(_ auth: CFHTTPAuthentication, _ request: CFHTTPMessage) -> Bool
```

## Parameters

- `auth`: The CFHTTPAuthentication object to examine.
- `request`: Request that auth is to be tested against.

## Return Value

Return Value TRUE if auth is associated with request, otherwise FALSE.

## Discussion

Discussion If this function returns TRUE, you can use auth to provide authentication information when using request.

## See Also

### HTTP Authentication

- [CFHTTPAuthentication](cfnetwork/cfhttpauthentication.md)
- [CFHTTPAuthenticationCopyDomains(_:)](cfnetwork/cfhttpauthenticationcopydomains(_:).md)
- [CFHTTPAuthenticationCopyMethod(_:)](cfnetwork/cfhttpauthenticationcopymethod(_:).md)
- [CFHTTPAuthenticationCopyRealm(_:)](cfnetwork/cfhttpauthenticationcopyrealm(_:).md)
- [CFHTTPAuthenticationCreateFromResponse(_:_:)](cfnetwork/cfhttpauthenticationcreatefromresponse(_:_:).md)
- [CFHTTPAuthenticationGetTypeID()](cfnetwork/cfhttpauthenticationgettypeid().md)
- [CFHTTPAuthenticationIsValid(_:_:)](cfnetwork/cfhttpauthenticationisvalid(_:_:).md)
- [CFHTTPAuthenticationRequiresAccountDomain(_:)](cfnetwork/cfhttpauthenticationrequiresaccountdomain(_:).md)
- [CFHTTPAuthenticationRequiresOrderedRequests(_:)](cfnetwork/cfhttpauthenticationrequiresorderedrequests(_:).md)
- [CFHTTPAuthenticationRequiresUserNameAndPassword(_:)](cfnetwork/cfhttpauthenticationrequiresusernameandpassword(_:).md)
- [kCFHTTPAuthenticationAccountDomain](cfnetwork/kcfhttpauthenticationaccountdomain.md)
- [kCFHTTPAuthenticationPassword](cfnetwork/kcfhttpauthenticationpassword.md)
- [kCFHTTPAuthenticationSchemeBasic](cfnetwork/kcfhttpauthenticationschemebasic.md)
- [kCFHTTPAuthenticationSchemeDigest](cfnetwork/kcfhttpauthenticationschemedigest.md)
- [kCFHTTPAuthenticationSchemeKerberos](cfnetwork/kcfhttpauthenticationschemekerberos.md)
