Skip to main content

UnknownSession

@webda/core


Class: UnknownSession

Defined in: packages/core/src/session/session.ts:149

Unknown session that allows all keys

Extends​

Indexable​

[key: string]: any

Allow any type of fields

Constructors​

Constructor​

new UnknownSession(): UnknownSession

Returns​

UnknownSession

Inherited from​

Session.constructor

Properties​

amr?​

optional amr?: string[]

Defined in: packages/core/src/session/session.ts:49

Authentication methods used

Inherited from​

Session.amr


authAt?​

optional authAt?: number

Defined in: packages/core/src/session/session.ts:65

When the session was authenticated (ms timestamp, stamped by the Authentication service): a session older than the last password change of its user is loaded as anonymous

Inherited from​

Session.authAt


changed​

protected changed: boolean = false

Defined in: packages/core/src/session/session.ts:22

Inherited from​

Session.changed


identUsed​

identUsed: string

Defined in: packages/core/src/session/session.ts:34

Ident used

Inherited from​

Session.identUsed


mfa?​

optional mfa?: MfaState

Defined in: packages/core/src/session/session.ts:54

MFA state of the session

Inherited from​

Session.mfa


provider?​

optional provider?: string

Defined in: packages/core/src/session/session.ts:44

Authentication provider used

Inherited from​

Session.provider


refreshFamily?​

optional refreshFamily?: string

Defined in: packages/core/src/session/session.ts:59

Refresh token family identifier

Inherited from​

Session.refreshFamily


roles​

roles: string[]

Defined in: packages/core/src/session/session.ts:39

User current roles

Inherited from​

Session.roles


stateless?​

optional stateless?: boolean

Defined in: packages/core/src/session/session.ts:71

Session is stateless (not persisted in cookies)

Inherited from​

Session.stateless


userId?​

optional userId?: string

Defined in: packages/core/src/session/session.ts:30

User id

Inherited from​

Session.userId


uuid​

uuid: string

Defined in: packages/core/src/session/session.ts:26

Session uuid

Inherited from​

Session.uuid

Methods​

getProxy()​

getProxy(): this

Defined in: packages/core/src/session/session.ts:128

Get the proxy to be able to track modification

Returns​

this

this for chaining

Inherited from​

Session.getProxy


isDirty()​

isDirty(): boolean

Defined in: packages/core/src/session/session.ts:120

Session is dirty and requires save

Returns​

boolean

true if the condition is met

Inherited from​

Session.isDirty


isLogged()​

isLogged(): boolean

Defined in: packages/core/src/session/session.ts:104

If session is authenticated

Returns​

boolean

true if the condition is met

Inherited from​

Session.isLogged


isPending()​

isPending(): boolean

Defined in: packages/core/src/session/session.ts:112

If session is pending MFA verification

Returns​

boolean

true if the condition is met

Inherited from​

Session.isPending


login()​

login(userId, identUsed, options?): void

Defined in: packages/core/src/session/session.ts:79

Login

Parameters​

userId​

string

the user identifier

identUsed​

string

the identity used

options?​

LoginOptions = {}

login options including provider, amr, and mfa state

Returns​

void

Inherited from​

Session.login


logout()​

logout(): void

Defined in: packages/core/src/session/session.ts:89

Logout

Returns​

void

Inherited from​

Session.logout