LaminarSession

dev.cheleb.ziotapir.laminar.LaminarSession
trait LaminarSession[+UserToken <: WithToken] extends Session[UserToken]

Attributes

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

Members list

Value members

Abstract methods

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

This method will return a Signal that will be updated when the user state changes.

This method will return a Signal that will be updated when the user state changes.

It takes two arguments to produce a value depending on the user state

Value parameters

withSession

the value to produce when the user is logged in

withoutSession

the value to produce when the user is not logged in

Attributes

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

Inherited and Abstract methods

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

Inherited from:
Session
def getToken(issuer: Uri): Option[WithToken]

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

Inherited from:
Session
def isActive: Boolean

This method returns true user is active.

This method returns true user is active.

Attributes

Inherited from:
Session
def loadUserState(issuer: Uri): Unit

Load the user state from the storage.

Load the user state from the storage.

his method is used restore the session (ie: page reload).

Attributes

Inherited from:
Session
def loadUserState(): Unit

Load the user state from the storage with Same Origin issuer.

Load the user state from the storage with Same Origin issuer.

This method is used restore the session (ie: page reload).

Attributes

Inherited from:
Session
def saveToken(token: String): 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

Inherited from:
Session
def saveToken(issuer: Uri, token: String): 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

Inherited from:
Session