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