<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorControlClient/isAuthenticated",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A13ControlClientC15isAuthenticatedSbvp"
  },
  "title" : "isAuthenticated"
}
-->

# isAuthenticated

`true` once any successful `AUTHENTICATE` (or pre-auth
construction) has marked this client ready.

```
var isAuthenticated: Bool { get }
```

## Discussion

Becomes `true` after the first successful
[`authenticate(password:)`](/documentation/Tor/TorControlClient/authenticate(password:)) call or after
[`init(fileDescriptor:preAuthenticated:dataDirectory:)`](/documentation/Tor/TorControlClient/init(fileDescriptor:preAuthenticated:dataDirectory:)) with
`preAuthenticated: true`. Never reverts to `false` within a
single instance — discard the client and construct a new one to
re-authenticate a socket from scratch.

> Note: Reads race-safely with a concurrent
> ``doc://Tor/documentation/Tor/TorControlClient/authenticate(password:)``; the underlying flag is
> `Mutex<Bool>`-guarded (SE-0410).