---
title: ASImportableCredential.TOTP
framework: authenticationservices
role: symbol
role_heading: Structure
path: authenticationservices/asimportablecredential/totp
---

# ASImportableCredential.TOTP

A type to represent a time-based one-time password generator (TOTP).

## Declaration

```swift
struct TOTP
```

## Overview

Overview This type is a representation of TOTP as defined in the Credential Exchange Format (CXF) specification.

## Topics

### Accessing TOTP properties

- [secret](authenticationservices/asimportablecredential/totp/secret.md)
- [period](authenticationservices/asimportablecredential/totp/period.md)
- [digits](authenticationservices/asimportablecredential/totp/digits.md)
- [algorithm](authenticationservices/asimportablecredential/totp/algorithm-swift.property.md)
- [ASImportableCredential.TOTP.Algorithm](authenticationservices/asimportablecredential/totp/algorithm-swift.enum.md)
- [issuer](authenticationservices/asimportablecredential/totp/issuer.md)

### Initializers

- [init(secret:period:digits:userName:algorithm:issuer:)](authenticationservices/asimportablecredential/totp/init(secret:period:digits:username:algorithm:issuer:).md)

### Instance Properties

- [userName](authenticationservices/asimportablecredential/totp/username.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Login credential types

- [ASImportableCredential.basicAuthentication(_:)](authenticationservices/asimportablecredential/basicauthentication(_:).md)
- [ASImportableCredential.BasicAuthentication](authenticationservices/asimportablecredential/basicauthentication.md)
- [ASImportableCredential.passkey(_:)](authenticationservices/asimportablecredential/passkey(_:).md)
- [ASImportableCredential.Passkey](authenticationservices/asimportablecredential/passkey.md)
- [ASImportableCredential.totp(_:)](authenticationservices/asimportablecredential/totp(_:).md)
