---
title: "tokenSession(_:supports:keyObjectID:algorithm:)"
framework: cryptotokenkit
role: symbol
role_heading: Instance Method
path: "cryptotokenkit/tktokensessiondelegate/tokensession(_:supports:keyobjectid:algorithm:)"
---

# tokenSession(_:supports:keyObjectID:algorithm:)

Asks the delegate whether the token session supports a given operation using the specified key and algorithm.

## Declaration

```swift
optional func tokenSession(_ session: TKTokenSession, supports operation: TKTokenOperation, keyObjectID: TKToken.ObjectID, algorithm: TKTokenKeyAlgorithm) -> Bool
```

## Parameters

- `session`: The token session.
- `operation`: The operation to perform. For possible values, see TKTokenOperation.
- `keyObjectID`: The identifier of the private key object.
- `algorithm`: The algorithm to be used by the operation.

## Return Value

Return Value true if the operation is supported; otherwise, false.

## See Also

### Determining Support for Operations

- [TKTokenOperation](cryptotokenkit/tktokenoperation.md)
- [TKToken.ObjectID](cryptotokenkit/tktoken/objectid.md)
- [TKTokenKeyAlgorithm](cryptotokenkit/tktokenkeyalgorithm.md)
