CredentialProtocol

public protocol CredentialProtocol : AnyObject, Sendable

A cryptographic credential.

This is tied to a particular client via either its client id or certificate bundle, depending on its credential type, but is independent of any client instance or storage.

To attach to a particular client instance and store, see [CoreCryptoContext::add_credential][crate::CoreCryptoContext::add_credential].

  • Get the earliest possible validity of this credential, expressed as seconds after the unix epoch.

    Basic credentials have no defined earliest validity and will always return 0.

    Declaration

    Swift

    func earliestValidity() -> UInt64
  • Get the type of this credential.

    Declaration

    Swift

    func type() throws -> CredentialType