Session
Class: Session
Defined in: packages/core/src/session/session.ts:20
Session
Extended by
Constructors
Constructor
new Session():
Session
Returns
Session
Properties
amr?
optionalamr?:string[]
Defined in: packages/core/src/session/session.ts:49
Authentication methods used
authAt?
optionalauthAt?: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
changed
protectedchanged:boolean=false
Defined in: packages/core/src/session/session.ts:22
identUsed
identUsed:
string
Defined in: packages/core/src/session/session.ts:34
Ident used
mfa?
optionalmfa?:MfaState
Defined in: packages/core/src/session/session.ts:54
MFA state of the session
provider?
optionalprovider?:string
Defined in: packages/core/src/session/session.ts:44
Authentication provider used
refreshFamily?
optionalrefreshFamily?:string
Defined in: packages/core/src/session/session.ts:59
Refresh token family identifier
roles
roles:
string[]
Defined in: packages/core/src/session/session.ts:39
User current roles
stateless?
optionalstateless?:boolean
Defined in: packages/core/src/session/session.ts:71
Session is stateless (not persisted in cookies)
userId?
optionaluserId?:string
Defined in: packages/core/src/session/session.ts:30
User id
uuid
uuid:
string
Defined in: packages/core/src/session/session.ts:26
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
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
isLogged()
isLogged():
boolean
Defined in: packages/core/src/session/session.ts:104
If session is authenticated
Returns
boolean
true if the condition is met
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
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
logout()
logout():
void
Defined in: packages/core/src/session/session.ts:89
Logout
Returns
void