public protocol URLSessionDataTaskProtocol
public protocol URLSessionProtocol
func httpDataTask(with request: URLRequest,
@objc public protocol UserStorage
A type representing storage, where already authenticated users will be kept between app launches. By default this SDK uses concrete implementation of the protocol done at SQLiteUserStorage class.
Also keep in mind, that this protocol doesn’t provide any data encryption and therefore developers have to implement it by themselves.
func loadStorage() throws
func add(user: User) throws
Adds new user to the storage
- Parameter user: already registered user.
|user||already registered user.|
func userExists(with userId: String) -> Bool
Check whether there is a user in storage with given user id.
- Parameter userId: user id, that is checked in the storage.
|userId||user id, that is checked in the storage.|
func deleteUser(by userId: String) -> Bool
Deletes user with given user id.
- Parameter userId: user id for which user have to be deleted.
|userId||user id for which user have to be deleted.|
func all() -> [User]
Get all users written in storage.