Session

dev.cheleb.ziolaminartapir.Session
trait Session[UserToken <: WithToken]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SessionLive[UserToken]

Members list

Value members

Abstract methods

def apply[A](withoutSession: => A)(withSession: UserToken => A): Signal[A]
def clearUserState(): Unit

Clear the user state. This method is used to log out the user. It should remove the token from the session and the storage.

Clear the user state. This method is used to log out the user. It should remove the token from the session and the storage.

Attributes

def getToken(issuer: Uri): Option[UserToken]

Get the token from the storage. Tokens are stored by issuer (the host and port of the issuer).

Get the token from the storage. Tokens are stored by issuer (the host and port of the issuer).

Attributes

def isActive: Boolean

This method is used to produce an Option when the user is active.

This method is used to produce an Option when the user is active.

Attributes

def loadUserState(issuer: Uri): Unit

Load the user state from the storage. This method is used to log in the

Load the user state from the storage. This method is used to log in the

Attributes

def saveToken(issuer: Uri, token: UserToken): Unit

Save the token in the storage. Tokens are stored by issuer (the host and port of the issuer).

Save the token in the storage. Tokens are stored by issuer (the host and port of the issuer).

Attributes

def whenActive[A](callback: => A): Signal[Option[A]]