Local Session Helper

class LocalSessionHelper(val databaseDriverFactory: DatabaseDriverFactory)

The LocalSessionHelper class is useful to manage the local sessions of the user, so manage the credentials of the user and all his/her personal data like profile pic, email and password

Author

N7ghtm4r3 - Tecknobit

Parameters

databaseDriverFactory

: the driver factory used to create the specific driver for each platform

See also

LocalSessionUtils

Constructors

Link copied to clipboard
constructor(databaseDriverFactory: DatabaseDriverFactory)

Properties

Functions

Link copied to clipboard
open fun changeSessionValue(key: String, sessionValue: String)

Method to change a value of the current session

Link copied to clipboard
open fun deleteAllSessions()

Method to delete all the local sessions, used when the user executes a logout or the account deletion No-any params required

Link copied to clipboard
open fun deleteSession(id: String)

Method to delete a specific local session specified by the identifier of the user in that session

Link copied to clipboard
open fun getActiveSession(): <Error class: unknown class>?

Method to get the current active local session

Link copied to clipboard
open fun getSession(id: String): <Error class: unknown class>?

Method to get the local session specified by the identifier of the user in that session

Link copied to clipboard
open fun getSessions(): List<<Error class: unknown class>>

Method to list all the local sessions of the user.

Link copied to clipboard
open fun insertSession(id: String, token: String, profilePicUrl: String, name: String, surname: String, email: String, password: String, hostAddress: String, role: <Error class: unknown class>, language: String)

Method to insert a new session

Link copied to clipboard
fun logout()

Method to perform the logout action and clear the current local sessions stored

Link copied to clipboard

Method to set the current active session as inactive

Link copied to clipboard

Method to set as the active session a new session