UserIdentityStorage

open class UserIdentityStorage : UserIdentityStoring

Default implementation for the UserIdentityStoring.

  • The store to use when handling UserIdentitys.

    Declaration

    Swift

    open var store: CodableStoring
  • This closure defines the key for storing the UserIdentity in the CodableStoring store.

    Declaration

    Swift

    open var keyHandler: (URL) -> String
  • Default key prefix for storing UserIdentitys.

    Declaration

    Swift

    public static let keyPrefix: String
  • Instantiates the UserIdentityStoring based on a CodableStoring. It will use the CodableStoring to store and retrieve the UserIdentitys.

    Declaration

    Swift

    public init(store: CodableStoring, keyHandler: @escaping (URL) -> String = UserIdentityStorage.key)

    Parameters

    store

    The store to use when handling UserIdentitys.

    keyHandler

    This closure defines the key for storing the UserIdentity in the CodableStoring store.

  • Declaration

    Swift

    public func store(identity: Data, for url: URL) throws
  • Declaration

    Swift

    public func identity(for url: URL) throws -> Data?
  • Declaration

    Swift

    public func delete(for url: URL) throws
  • Default key handler.

    Declaration

    Swift

    public class func key(for url: URL) -> String