---
title: TKTokenSession
framework: cryptotokenkit
role: symbol
role_heading: Class
path: cryptotokenkit/tktokensession
---

# TKTokenSession

A token session that manages the authentication state of a token.

## Declaration

```swift
class TKTokenSession
```

## Overview

Overview A token session communicates with its delegate to perform operations with its token that are bound to the authentication state. A session is always instantiated by a TKToken instance through the token’s delegate when the framework detects access to the token from a new authentication session. important: Never share the authentication status of a token, such as the PIN entered to unlock a smart card, with other token sessions.

## Topics

### Creating Token Sessions

- [init(token:)](cryptotokenkit/tktokensession/init(token:).md)

### Responding to Authentication Events

- [delegate](cryptotokenkit/tktokensession/delegate.md)
- [TKTokenSessionDelegate](cryptotokenkit/tktokensessiondelegate.md)

### Accessing the Token

- [token](cryptotokenkit/tktokensession/token.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [TKSmartCardTokenSession](cryptotokenkit/tksmartcardtokensession.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Tokens

- [TKTokenWatcher](cryptotokenkit/tktokenwatcher.md)
- [TKTokenDriver](cryptotokenkit/tktokendriver.md)
- [TKToken](cryptotokenkit/tktoken.md)
