MCPcopy Create free account

hub / github.com/adonisjs/session / functions

Functions192 in github.com/adonisjs/session

↓ 1 callersMethodsetFlashMessages
* Set flash messages
src/plugins/japa/browser_client.ts:50
↓ 1 callersMethodsetSession
* Set session data
src/plugins/japa/browser_client.ts:45
↓ 1 callersMethodtoIntended
(fallback?: string)
src/session_middleware.ts:27
↓ 1 callersMethodtoIntendedRoute
(...args: Parameters<Redirect['toRoute']>)
src/session_middleware.ts:28
↓ 1 callersMethodtoObject
* Returns object representation of values * * @example * const obj = store.toObject()
src/values_store.ts:100
↓ 1 callersFunctiontransformSameSiteOption
* Transforms AdonisJS same site option to playwright same site option * * @param sameSite - AdonisJS cookie sameSite option
src/plugins/japa/browser_client.ts:59
↓ 1 callersMethodwithFlashMessages
* Make HTTP request along with the provided session flash * messages.
src/plugins/japa/api_client.ts:35
↓ 1 callersMethodwithIntendedUrl
()
src/session_middleware.ts:26
↓ 1 callersMethodwithSession
* Make HTTP request along with the provided session data
src/plugins/japa/api_client.ts:29
↓ 1 callersMethodwrite
* Writes session values to an encrypted cookie * * @param sessionId - Session identifier used as cookie name * @param values - Session data t
src/stores/cookie.ts:78
Method#store
* A store serves one request and remembers the sessions it read. * The collection is a singleton, so each operation gets a new store.
src/session_collection.ts:54
MethodassertHasValidationError
* Assert flash messages has validation errors for * the given field
src/plugins/japa/api_client.ts:83
Methodclear
* Resets store by clearing all values * * @example * store.clear() // Removes all data from store
src/values_store.ts:273
Methodcommit
* Commits data to the session store * * @example * await client.commit() // Saves all changes to the store
src/client.ts:93
Functioncompile
(parser, buffer, token)
src/plugins/edge.ts:38
Methodconstructor
(protected app: ApplicationService)
providers/session_provider.ts:34
Methodconstructor
* Creates a new session middleware instance * * @param config - Session configuration with store settings * @param emitter - Event emitter se
src/session_middleware.ts:138
Methodconstructor
* Creates a new session client * * @param store - Session store contract implementation
src/client.ts:57
Methodconstructor
* Creates a new SessionCollection instance * * @param config - Resolved session configuration
src/session_collection.ts:46
Methodconstructor
* Creates a new readonly values store * * @param values - Initial session data or null
src/values_store.ts:41
Methodconstructor
* Creates a new values store * * @param values - Initial session data or null
src/values_store.ts:146
Methodconstructor
* Creates a new session instance * * @param config - Session configuration * @param storeFactory - Factory function to create session store
src/session.ts:145
Methodconstructor
* Creates a new file store instance * * @param config - File store configuration * @param age - Session age in seconds or time expression (e.
src/stores/file.ts:52
Methodconstructor
* Creates a new Redis store instance * * @param connection - Redis connection instance * @param age - Session age in seconds or time expressi
src/stores/redis.ts:66
Methodconstructor
* Creates a new DynamoDB store instance * * @param client - DynamoDB client instance * @param age - Session age in seconds or time expression
src/stores/dynamodb.ts:82
Methodconstructor
* Creates a new cookie store instance * * @param config - Cookie configuration options * @param ctx - HTTP context
src/stores/cookie.ts:44
Methodconstructor
* Creates a new database store instance * * @param client - Lucid query client instance * @param age - Session age in seconds or time express
src/stores/database.ts:67
Functioncontext
(context)
src/plugins/japa/browser_client.ts:127
FunctioncookieDriver
(ctx, config)
tests/session.spec.ts:44
FunctioncookieDriver
(ctx, config)
tests/redirect_macros.spec.ts:37
Functioncreate
(callback: (req: IncomingMessage, res: ServerResponse) => any)
tests_helpers/index.ts:26
Methoddecrement
* Decrements a numeric value. Raises an error when underlying value is not a number. * * @param key - The key or key path to decrement * @par
src/values_store.ts:232
Methoddestroy
* Destroys the session data from the store * * @param sessionId - Optional session ID to destroy (defaults to current session) * * @exampl
src/client.ts:113
Methoddestroy
* Destroys a session by its ID * * @param sessionId - Session identifier * * @example * await sessionCollection.destroy('sess_abc123')
src/session_collection.ts:95
Methoddestroy
* Removes the session file from the disk * * @param sessionId - Session identifier * * @example * await store.destroy('sess_abc123')
src/stores/file.ts:218
Methoddestroy
* Removes session data from Redis * * @param sessionId - Session identifier to remove * * @example * await store.destroy('sess_abc123')
src/stores/redis.ts:249
Methoddestroy
* Removes session data from DynamoDB * * @param sessionId - Session identifier to remove * * @example * await store.destroy('sess_abc12
src/stores/dynamodb.ts:197
Methoddestroy
* Removes a single session from memory * * @param sessionId - Session identifier to remove * * @example * store.destroy('sess_abc123')
src/stores/memory.ts:64
Methoddestroy
* Removes the session cookie from the client * * @param sessionId - Session identifier used as cookie name * * @example * store.destroy
src/stores/cookie.ts:91
Functiondriver
(key)
tests/plugins/api_client.spec.ts:65
Functiondriver
(key)
tests/plugins/browser_client.spec.ts:66
FunctionedgePluginSession
(edge)
src/plugins/edge.ts:31
FunctionfileStore
()
tests/plugins/api_client.spec.ts:247
FunctionfileStore
()
tests/plugins/browser_client.spec.ts:221
Methodflash
* Merges flash messages with existing flash data * * @param values - Flash message data to merge * * @example * client.flash({ success:
src/client.ts:82
Methodfresh
* Returns true if a fresh session was created during the request
src/session.ts:98
Methodget
* Returns the session data for the given session ID, * or null if the session does not exist * * @param sessionId - Session identifier *
src/session_collection.ts:82
Methodhas
* Checks if a value exists. Includes extra guards to check arrays for length. * * @param key - The key or key path to check * @param checkFor
src/values_store.ts:75
MethodhasBeenModified
* Returns true if the store has been modified
src/values_store.ts:153
MethodhasBeenModified
* Returns true if the session store has been modified
src/session.ts:133
MethodhasRegeneratedSession
* Returns true if the session id has been re-generated during the current request
src/session.ts:119
Methodincrement
* Increments a numeric value. Raises an error when underlying value is not a number. * * @param key - The key or key path to increment * @par
src/values_store.ts:213
Methodinitiated
* Returns true if the session store has been initiated
src/session.ts:112
MethodisEmpty
* Returns true if the store is empty
src/values_store.ts:32
MethodisEmpty
* Returns true if the session store is empty
src/session.ts:126
Functionload
()
tests/session.spec.ts:1246
Methodmerge
* Merge custom options
factories/session_middleware_factory.ts:44
Methodmerge
* Merges values with existing store data * * @param values - Values to merge with existing data * * @example * store.merge({ newField:
src/values_store.ts:262
FunctionpluginFn
()
src/plugins/japa/api_client.ts:125
FunctionpluginFn
()
src/plugins/japa/browser_client.ts:113
Methodread
* Reads the session data from the disk * * @param sessionId - Session identifier * * @example * const data = await store.read('sess_abc
src/stores/file.ts:124
Methodread
* Reads session data from Redis * * @param sessionId - Session identifier * * @example * const data = await store.read('sess_abc123')
src/stores/redis.ts:173
Methodread
* Reads session data from DynamoDB * * @param sessionId - Session identifier * * @example * const data = await store.read('sess_abc123'
src/stores/dynamodb.ts:112
Methodread
* Reads session value from memory * * @param sessionId - Session identifier * * @example * const data = store.read('sess_abc123')
src/stores/memory.ts:39
Methodread
* Reads session data from the database * * @param sessionId - Session identifier * * @example * const data = await store.read('sess_abc
src/stores/database.ts:174
Methodreadonly
* Returns true if the session is in readonly state
src/session.ts:105
Methodrun
()
commands/make_session_table.ts:20
MethodsessionId
* Gets the session id for the current HTTP request
src/session.ts:91
Methodtag
* Tag a session with a user ID. * Only supported by Memory, Redis and Database stores. * * @param sessionId - Session identifier * @param
src/session_collection.ts:110
Methodtag
* Tag the current session with a user ID. * Only supported by Memory, Redis, and Database stores. * This enables features like "logout from all
src/session.ts:636
Methodtag
* Tag a session with a user ID. For a new session, the next write by * this store tags it again, atomically with its data. * * @param session
src/stores/redis.ts:274
Methodtag
* Tag a session with a user ID * * @param sessionId - Session identifier * @param userId - User identifier to tag the session with
src/stores/memory.ts:82
Methodtag
* Tags a session with a user ID for tracking user sessions. Updates the * row when it exists. For a new session, the next write by this store *
src/stores/database.ts:278
Methodtagged
* Get all sessions for a given user ID (tag). * Only supported by Memory, Redis and Database stores. * * @param userId - User identifier to g
src/session_collection.ts:126
Methodtagged
* Get all sessions for a given user ID (tag) * * @param userId - User identifier to get sessions for
src/stores/redis.ts:304
Methodtagged
* Get all sessions for a given user ID (tag) * * @param userId - User identifier to get sessions for
src/stores/memory.ts:101
Methodtagged
* Returns all active sessions for a given user ID (tag). * Only returns non-expired sessions. * * @param userId - User identifier to get sess
src/stores/database.ts:325
Methodtouch
* Updates the session expiry by updating the file's modification time * * @param sessionId - Session identifier * * @example * await st
src/stores/file.ts:231
Methodtouch
* Updates the session expiry time in Redis * * @param sessionId - Session identifier * * @example * await store.touch('sess_abc123')
src/stores/redis.ts:262
Methodtouch
* Updates the session expiry time in DynamoDB * * @param sessionId - Session identifier * * @example * await store.touch('sess_abc123')
src/stores/dynamodb.ts:216
Methodtouch
* No-op for memory store as there's no expiry mechanism * * @param sessionId - Session identifier (unused)
src/stores/memory.ts:74
Methodtouch
* Updates the cookie expiry by rewriting it with existing values * * @param sessionId - Session identifier used as cookie name * * @exampl
src/stores/cookie.ts:106
Methodtouch
* Updates the session expiry time in the database * * @param sessionId - Session identifier * * @example * await store.touch('sess_abc1
src/stores/database.ts:255
Methoduntag
* Removes the tag association between this session and a user ID. * Only supported by Memory, Redis, and Database stores. * * @param userId -
src/session.ts:653
Methoduntag
* Untag a session from a user ID * * @param sessionId - Session identifier * @param userId - User identifier to untag the session from
src/stores/redis.ts:293
Methoduntag
* Untag a session from a user ID * * @param sessionId - Session identifier * @param userId - User identifier (unused in memory store, as sess
src/stores/memory.ts:92
Methoduntag
* Removes the tag association between a session and a user ID. * Sets the user_id column to null for the given session. * * @param sessionId
src/stores/database.ts:305
Methodwrite
* Writes the session data to the disk as a string. The file of a session * read by this store is only rewritten while it still exists, so a logout
src/stores/file.ts:179
Methodwrite
* Writes session values to Redis with expiry. A session read by this * store is only updated while it still exists (`XX`), so a logout or * a de
src/stores/redis.ts:196
Methodwrite
* Writes session values to DynamoDB with expiry. A session read by this * store is only updated while it still exists, so a logout or a destroy
src/stores/dynamodb.ts:164
Methodwrite
* Saves session value in memory for a given session id * * @param sessionId - Session identifier * @param values - Session data to store *
src/stores/memory.ts:52
Methodwrite
* Writes session values to the database with expiry. A session read by * this store is only updated (no insert), so a logout or a destroy that *
src/stores/database.ts:207
← previous101–192 of 192, ranked by callers