FileSessionStorage
@objc(VSRFileSessionStorage)
open class FileSessionStorage : NSObject, SessionStorage
FileSessionStorage using files
Note
This class is thread-safe-
Initializer
Declaration
Swift
@objc public init(appGroup: String?, identity: String, crypto: VirgilCrypto, identityKeyPair: VirgilKeyPair)
Parameters
appGroup
appGroup
identity
identity of this user
crypto
VirgilCrypto that will be forwarded to SecureSession
identityKeyPair
Key pair to encrypt session
-
Stores session
Throws
Rethrows from FileSystemDeclaration
Swift
public func storeSession(_ session: SecureSession) throws
Parameters
session
session to store
-
Retrieves session
Declaration
Swift
public func retrieveSession(participantIdentity: String, name: String) -> SecureSession?
Parameters
participantIdentity
participant identity
name
session name
Return Value
Stored session if found, nil otherwise
-
Deletes session
Throws
Rethrows from FileSystemDeclaration
Swift
public func deleteSession(participantIdentity: String, name: String?) throws
Parameters
participantIdentity
participant identity
name
session name
-
Removes all sessions
Throws
Rethrows from FileSystemDeclaration
Swift
public func reset() throws