Home Reference Source
import Session from '@osjs/client/src/session.js'
public class | source

Session

Session Handler

Constructor Summary

Public Constructor
public

constructor(core: Core)

Creates the Session Handler

Member Summary

Public Members
public

Core instance reference

Method Summary

Public Methods
public

Destroys instance

public

Loads session

public

Saves session

Public Constructors

public constructor(core: Core) source

Creates the Session Handler

Params:

NameTypeAttributeDescription
core Core

Core reference

Public Members

public core: Core source

Core instance reference

Public Methods

public destroy() source

Destroys instance

public load(fresh: boolean): Promise<boolean> source

Loads session

Params:

NameTypeAttributeDescription
fresh boolean
  • optional
  • default: false

Kill all current applications first

Return:

Promise<boolean>

public save(): Promise<boolean> source

Saves session

Return:

Promise<boolean>