UserIdentityStorage
open class UserIdentityStorage : UserIdentityStoring
Default implementation for the UserIdentityStoring
.
-
The store to use when handling
UserIdentity
s.Declaration
Swift
open var store: CodableStoring
-
This closure defines the key for storing the
UserIdentity
in theCodableStoring
store.Declaration
Swift
open var keyHandler: (URL) -> String
-
Default key prefix for storing
UserIdentity
s.Declaration
Swift
public static let keyPrefix: String
-
Instantiates the
UserIdentityStoring
based on aCodableStoring
. It will use theCodableStoring
to store and retrieve theUserIdentity
s.Declaration
Swift
public init(store: CodableStoring, keyHandler: @escaping (URL) -> String = UserIdentityStorage.key)
Parameters
store
The store to use when handling
UserIdentity
s.keyHandler
This closure defines the key for storing the
UserIdentity
in theCodableStoring
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