Credential

open class Credential : CredentialProtocol, @unchecked 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

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

    Declaration

    Swift

    open func type() throws -> CredentialType
  • basic(ciphersuite:clientId:) From WireCoreCrypto

    Construct a new Credential from ciphersuite and client id

    Declaration

    Swift

    public static func basic(
        ciphersuite: Ciphersuite,
        clientId: ClientId
    ) throws -> Credential