RedisSessions

@accounts/redisGlobalsRedisSessions

Hierarchy

  • RedisSessions

Implements

  • DatabaseInterfaceSessions

Index

Constructors

Methods

Constructors

constructor

+ new RedisSessions(db: Redis, options?: AccountsRedisOptions): RedisSessions

Defined in redis.ts:20

Parameters:

NameType
dbRedis
options?AccountsRedisOptions

Returns: RedisSessions

Methods

createSession

createSession(userId: string, token: string, connection: ConnectionInformations, extraData?: object): Promise‹string›

Defined in redis.ts:30

Parameters:

NameTypeDefault
userIdstring-
tokenstring-
connectionConnectionInformations{}
extraData?object-

Returns: Promise‹string›


findSessionById

findSessionById(sessionId: string): Promise‹Session | null›

Defined in redis.ts:108

Parameters:

NameType
sessionIdstring

Returns: Promise‹Session | null›


findSessionByToken

findSessionByToken(token: string): Promise‹Session | null›

Defined in redis.ts:98

Parameters:

NameType
tokenstring

Returns: Promise‹Session | null›


invalidateAllSessions

invalidateAllSessions(userId: string, excludedSessionIds?: string[]): Promise‹void›

Defined in redis.ts:78

Parameters:

NameType
userIdstring
excludedSessionIds?string[]

Returns: Promise‹void›


invalidateSession

invalidateSession(sessionId: string): Promise‹void›

Defined in redis.ts:69

Parameters:

NameType
sessionIdstring

Returns: Promise‹void›


updateSession

updateSession(sessionId: string, connection: ConnectionInformations): Promise‹void›

Defined in redis.ts:59

Parameters:

NameType
sessionIdstring
connectionConnectionInformations

Returns: Promise‹void›