BasicCredentialStorage
open class BasicCredentialStorage : BasicCredentialStoring
Default implementation for the BasicCredential.
-
Default key prefix for storing
BasicCredentials.Declaration
Swift
public static let keyPrefix: String -
The store to use when handling
BasicCredentials.Declaration
Swift
open var store: CodableStoring -
This closure defines the key for storing the
BasicCredentialin theCodableStoringstore.Declaration
Swift
open var keyHandler: (URL) -> String -
Instantiates the
BasicCredentialStoringbased on aCodableStoring. It will use theCodableStoringto store and retrieve theBasicCredentials.Declaration
Swift
public init(store: CodableStoring, keyHandler: @escaping (URL) -> String = BasicCredentialStorage.key)Parameters
storeThe store to use when handling
BasicCredentials.keyHandlerThis closure defines the key for storing the
BasicCredentialin theCodableStoringstore.
-
Declaration
Swift
open func store(credential: BasicCredential, for url: URL) throws -
Declaration
Swift
public func credential(for url: URL) throws -> BasicCredential? -
Declaration
Swift
open func delete(for url: URL) throws
-
Clears all Credentials by removing keys related to stored data
Declaration
Swift
open func clear() -
Default key handler.
Declaration
Swift
public class func key(for url: URL) -> String