Interface SessionContainer
Methods
assertClaims
Parameters
Optional userContext: Record<string, any>
Returns Promise<void>
attachToRequestResponse
- attachToRequestResponse(reqResInfo: ReqResInfo, userContext?: Record<string, any>): void | Promise<void>
Parameters
reqResInfo: ReqResInfo
Optional userContext: Record<string, any>
Returns void | Promise<void>
fetchAndSetClaim
- fetchAndSetClaim<T>(claim: SessionClaim<T>, userContext?: Record<string, any>): Promise<void>
Type Parameters
Parameters
claim: SessionClaim<T>
Optional userContext: Record<string, any>
Returns Promise<void>
getAccessToken
- getAccessToken(userContext?: Record<string, any>): string
Parameters
Optional userContext: Record<string, any>
Returns string
getAccessTokenPayload
- getAccessTokenPayload(userContext?: Record<string, any>): any
Parameters
Optional userContext: Record<string, any>
Returns any
getAllSessionTokensDangerously
- getAllSessionTokensDangerously(): { accessAndFrontTokenUpdated: boolean; accessToken: string; antiCsrfToken: undefined | string; frontToken: string; refreshToken: undefined | string }
Returns { accessAndFrontTokenUpdated: boolean; accessToken: string; antiCsrfToken: undefined | string; frontToken: string; refreshToken: undefined | string }
accessAndFrontTokenUpdated: boolean
accessToken: string
antiCsrfToken: undefined | string
frontToken: string
refreshToken: undefined | string
getClaimValue
- getClaimValue<T>(claim: SessionClaim<T>, userContext?: Record<string, any>): Promise<undefined | T>
Type Parameters
Parameters
claim: SessionClaim<T>
Optional userContext: Record<string, any>
Returns Promise<undefined | T>
getExpiry
- getExpiry(userContext?: Record<string, any>): Promise<number>
Parameters
Optional userContext: Record<string, any>
Returns Promise<number>
getHandle
- getHandle(userContext?: Record<string, any>): string
Parameters
Optional userContext: Record<string, any>
Returns string
getRecipeUserId
- getRecipeUserId(userContext?: Record<string, any>): RecipeUserId
Parameters
Optional userContext: Record<string, any>
getSessionDataFromDatabase
- getSessionDataFromDatabase(userContext?: Record<string, any>): Promise<any>
Parameters
Optional userContext: Record<string, any>
Returns Promise<any>
getTenantId
- getTenantId(userContext?: Record<string, any>): string
Parameters
Optional userContext: Record<string, any>
Returns string
getTimeCreated
- getTimeCreated(userContext?: Record<string, any>): Promise<number>
Parameters
Optional userContext: Record<string, any>
Returns Promise<number>
getUserId
- getUserId(userContext?: Record<string, any>): string
Parameters
Optional userContext: Record<string, any>
Returns string
mergeIntoAccessTokenPayload
- mergeIntoAccessTokenPayload(accessTokenPayloadUpdate: JSONObject, userContext?: Record<string, any>): Promise<void>
Parameters
accessTokenPayloadUpdate: JSONObject
Optional userContext: Record<string, any>
Returns Promise<void>
removeClaim
- removeClaim(claim: SessionClaim<any>, userContext?: Record<string, any>): Promise<void>
Parameters
claim: SessionClaim<any>
Optional userContext: Record<string, any>
Returns Promise<void>
revokeSession
- revokeSession(userContext?: Record<string, any>): Promise<void>
Parameters
Optional userContext: Record<string, any>
Returns Promise<void>
setClaimValue
- setClaimValue<T>(claim: SessionClaim<T>, value: T, userContext?: Record<string, any>): Promise<void>
Type Parameters
Parameters
claim: SessionClaim<T>
value: T
Optional userContext: Record<string, any>
Returns Promise<void>
updateSessionDataInDatabase
- updateSessionDataInDatabase(newSessionData: any, userContext?: Record<string, any>): Promise<any>
Parameters
newSessionData: any
Optional userContext: Record<string, any>
Returns Promise<any>