Classes

The following classes are available globally.

  • An authenticator that uses an application PIN for user verification. This class provides an implementation for generating PIN-protected keys and authenticating the user by prompting for the PIN.

    See more

    Declaration

    Swift

    public class AppPinAuthenticator : DefaultDeviceAuthenticator
  • An authenticator that uses biometrics (Face ID or Touch ID) with a fallback to device credentials (passcode/PIN). This class extends DefaultDeviceAuthenticator and provides specific implementations for key generation, authentication, and support checks for this combined authentication type.

    See more

    Declaration

    Swift

    public class BiometricDeviceCredentialAuthenticator : DefaultDeviceAuthenticator
  • An authenticator that uses biometrics (Face ID or Touch ID) for user authentication. This class extends DefaultDeviceAuthenticator and provides specific implementations for biometric-only key generation, authentication, and support checks.

    See more

    Declaration

    Swift

    public class BiometricOnlyAuthenticator : DefaultDeviceAuthenticator
  • A base class for device authenticators, providing default implementations for the DeviceAuthenticator protocol. Subclasses should override methods to provide specific authentication logic.

    See more

    Declaration

    Swift

    open class DefaultDeviceAuthenticator : DeviceAuthenticator
  • An authenticator that does not require any user interaction. This authenticator is used when the authentication type is none.

    See more

    Declaration

    Swift

    public class NoneAuthenticator : DefaultDeviceAuthenticator
  • A default implementation of PinCollector that uses a UIAlertController to prompt the user for their PIN.

    See more

    Declaration

    Swift

    public class DefaultPinCollector : NSObject, PinCollector, @unchecked Sendable
  • A Journey callback for handling device binding. This callback is received from the AIC authentication flow when a device needs to be bound to a user account.

    See more

    Declaration

    Swift

    public class DeviceBindingCallback : AbstractCallback, @unchecked Sendable, JourneyAware, ContinueNodeAware
  • A Journey callback for handling device signing verification. This callback is received from the AIC authentication flow when a challenge needs to be signed by a bound device.

    See more

    Declaration

    Swift

    public class DeviceSigningVerifierCallback : AbstractCallback, @unchecked Sendable, JourneyAware, ContinueNodeAware
  • Configuration class for AppPinAuthenticator that defines PIN collection, storage, and security settings.

    See more

    Declaration

    Swift

    public class AppPinConfig : AuthenticatorConfig
  • Configuration class for biometric authenticators.

    See more

    Declaration

    Swift

    public class BiometricAuthenticatorConfig : AuthenticatorConfig
  • Configuration for device binding. This class allows you to customize the behavior of the device binding and signing process.

    See more

    Declaration

    Swift

    public class DeviceBindingConfig
  • A class for managing cryptographic keys in the Keychain. This class provides methods for generating, retrieving, and deleting key pairs.

    See more

    Declaration

    Swift

    public class CryptoKey
  • Manages the migration of device binding data from the legacy SDK to the new SDK format.

    This class orchestrates a multi-step migration process that transfers user key metadata from the legacy keychain location to the new storage format.

    Migration Steps

    The migration executes three sequential steps:

    1. Check for Legacy Data: Verifies if legacy keychain data exists and needs migration
    2. Migrate User Keys: Transfers user key metadata from legacy keychain to new storage
    3. Cleanup: Removes legacy keychain data after successful migration

    Usage

    Automatic migration (recommended):

    // Migration starts automatically when BindingModule is first used
    // or can be triggered explicitly
    Task {
        try await BindingMigration.migrate()
    }
    

    Manual migration with custom configuration:

    Task {
        try await BindingMigration.migrate(
            accessGroup: "com.myapp.keychain",
            logger: myLogger,
            cleanupLegacyData: true
        )
    }
    

    Progress Monitoring

    The migration logs progress updates that can be observed through the provided logger:

    • Migration started
    • Legacy data check results
    • Number of keys migrated
    • Cleanup status
    • Completion or error details
    See more

    Declaration

    Swift

    public class BindingMigration
  • A module for handling device binding and signing callbacks. The callbacks are automatically registered when Journey.createJourney() is called. Manual registration using BindingModule.register() is optional and only needed if you’re not using the Journey framework.

    See more

    Declaration

    Swift

    public class BindingModule : NSObject
  • Configuration for UserKeysStorage.

    See more

    Declaration

    Swift

    public class UserKeyStorageConfig
  • The default implementation of UserKeySelector that uses a system alert to prompt the user.

    See more

    Declaration

    Swift

    public class DefaultUserKeySelector : UserKeySelector, @unchecked Sendable