<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CFNetwork",
  "identifier" : "/documentation/CFNetwork/CFHTTPAuthenticationCopyRealm(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "CFNetwork"
    ],
    "preciseIdentifier" : "c:@F@CFHTTPAuthenticationCopyRealm"
  },
  "title" : "CFHTTPAuthenticationCopyRealm(_:)"
}
-->

# CFHTTPAuthenticationCopyRealm(_:)

Gets an authentication information’s namespace.

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

## Parameters

`auth`

The CFHTTPAuthentication object to examine.

## Return Value

The namespace, if there is one; otherwise `NULL`. Ownership follows the [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029).

## Discussion

Some authentication methods provide a namespace, and it is usually used to prompt the user for a name and password.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)