---
title: "CFHTTPAuthenticationCopyMethod(_:)"
framework: cfnetwork
role: symbol
role_heading: Function
path: "cfnetwork/cfhttpauthenticationcopymethod(_:)"
---

# CFHTTPAuthenticationCopyMethod(_:)

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

## Declaration

```swift
func CFHTTPAuthenticationCopyMethod(_ auth: CFHTTPAuthentication) -> Unmanaged<CFString>
```

## Parameters

- `auth`: The CFHTTPAuthentication object to examine.

## Return Value

Return Value A string containing the authentication method that will be used auth is applied to a request. If more than one authentication method is available, the strongest authentication method is returned. Ownership follows the The Create Rule.

## See Also

### HTTP Authentication

- [CFHTTPAuthentication](cfnetwork/cfhttpauthentication.md)
- [CFHTTPAuthenticationAppliesToRequest(_:_:)](cfnetwork/cfhttpauthenticationappliestorequest(_:_:).md)
- [CFHTTPAuthenticationCopyDomains(_:)](cfnetwork/cfhttpauthenticationcopydomains(_:).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)
