Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adonisjs/session
/ functions
Functions
192 in github.com/adonisjs/session
⨍
Functions
192
◇
Types & classes
42
↓ 1 callers
Method
setFlashMessages
* Set flash messages
src/plugins/japa/browser_client.ts:50
↓ 1 callers
Method
setSession
* Set session data
src/plugins/japa/browser_client.ts:45
↓ 1 callers
Method
toIntended
(fallback?: string)
src/session_middleware.ts:27
↓ 1 callers
Method
toIntendedRoute
(...args: Parameters<Redirect['toRoute']>)
src/session_middleware.ts:28
↓ 1 callers
Method
toObject
* Returns object representation of values * * @example * const obj = store.toObject()
src/values_store.ts:100
↓ 1 callers
Function
transformSameSiteOption
* Transforms AdonisJS same site option to playwright same site option * * @param sameSite - AdonisJS cookie sameSite option
src/plugins/japa/browser_client.ts:59
↓ 1 callers
Method
withFlashMessages
* Make HTTP request along with the provided session flash * messages.
src/plugins/japa/api_client.ts:35
↓ 1 callers
Method
withIntendedUrl
()
src/session_middleware.ts:26
↓ 1 callers
Method
withSession
* Make HTTP request along with the provided session data
src/plugins/japa/api_client.ts:29
↓ 1 callers
Method
write
* 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
Method
assertHasValidationError
* Assert flash messages has validation errors for * the given field
src/plugins/japa/api_client.ts:83
Method
clear
* Resets store by clearing all values * * @example * store.clear() // Removes all data from store
src/values_store.ts:273
Method
commit
* Commits data to the session store * * @example * await client.commit() // Saves all changes to the store
src/client.ts:93
Function
compile
(parser, buffer, token)
src/plugins/edge.ts:38
Method
constructor
(protected app: ApplicationService)
providers/session_provider.ts:34
Method
constructor
* Creates a new session middleware instance * * @param config - Session configuration with store settings * @param emitter - Event emitter se
src/session_middleware.ts:138
Method
constructor
* Creates a new session client * * @param store - Session store contract implementation
src/client.ts:57
Method
constructor
* Creates a new SessionCollection instance * * @param config - Resolved session configuration
src/session_collection.ts:46
Method
constructor
* Creates a new readonly values store * * @param values - Initial session data or null
src/values_store.ts:41
Method
constructor
* Creates a new values store * * @param values - Initial session data or null
src/values_store.ts:146
Method
constructor
* Creates a new session instance * * @param config - Session configuration * @param storeFactory - Factory function to create session store
src/session.ts:145
Method
constructor
* 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
Method
constructor
* 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
Method
constructor
* 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
Method
constructor
* Creates a new cookie store instance * * @param config - Cookie configuration options * @param ctx - HTTP context
src/stores/cookie.ts:44
Method
constructor
* 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
Function
context
(context)
src/plugins/japa/browser_client.ts:127
Function
cookieDriver
(ctx, config)
tests/session.spec.ts:44
Function
cookieDriver
(ctx, config)
tests/redirect_macros.spec.ts:37
Function
create
(callback: (req: IncomingMessage, res: ServerResponse) => any)
tests_helpers/index.ts:26
Method
decrement
* 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
Method
destroy
* Destroys the session data from the store * * @param sessionId - Optional session ID to destroy (defaults to current session) * * @exampl
src/client.ts:113
Method
destroy
* Destroys a session by its ID * * @param sessionId - Session identifier * * @example * await sessionCollection.destroy('sess_abc123')
src/session_collection.ts:95
Method
destroy
* Removes the session file from the disk * * @param sessionId - Session identifier * * @example * await store.destroy('sess_abc123')
src/stores/file.ts:218
Method
destroy
* Removes session data from Redis * * @param sessionId - Session identifier to remove * * @example * await store.destroy('sess_abc123')
src/stores/redis.ts:249
Method
destroy
* Removes session data from DynamoDB * * @param sessionId - Session identifier to remove * * @example * await store.destroy('sess_abc12
src/stores/dynamodb.ts:197
Method
destroy
* Removes a single session from memory * * @param sessionId - Session identifier to remove * * @example * store.destroy('sess_abc123')
src/stores/memory.ts:64
Method
destroy
* Removes the session cookie from the client * * @param sessionId - Session identifier used as cookie name * * @example * store.destroy
src/stores/cookie.ts:91
Function
driver
(key)
tests/plugins/api_client.spec.ts:65
Function
driver
(key)
tests/plugins/browser_client.spec.ts:66
Function
edgePluginSession
(edge)
src/plugins/edge.ts:31
Function
fileStore
()
tests/plugins/api_client.spec.ts:247
Function
fileStore
()
tests/plugins/browser_client.spec.ts:221
Method
flash
* Merges flash messages with existing flash data * * @param values - Flash message data to merge * * @example * client.flash({ success:
src/client.ts:82
Method
fresh
* Returns true if a fresh session was created during the request
src/session.ts:98
Method
get
* 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
Method
has
* 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
Method
hasBeenModified
* Returns true if the store has been modified
src/values_store.ts:153
Method
hasBeenModified
* Returns true if the session store has been modified
src/session.ts:133
Method
hasRegeneratedSession
* Returns true if the session id has been re-generated during the current request
src/session.ts:119
Method
increment
* 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
Method
initiated
* Returns true if the session store has been initiated
src/session.ts:112
Method
isEmpty
* Returns true if the store is empty
src/values_store.ts:32
Method
isEmpty
* Returns true if the session store is empty
src/session.ts:126
Function
load
()
tests/session.spec.ts:1246
Method
merge
* Merge custom options
factories/session_middleware_factory.ts:44
Method
merge
* Merges values with existing store data * * @param values - Values to merge with existing data * * @example * store.merge({ newField:
src/values_store.ts:262
Function
pluginFn
()
src/plugins/japa/api_client.ts:125
Function
pluginFn
()
src/plugins/japa/browser_client.ts:113
Method
read
* Reads the session data from the disk * * @param sessionId - Session identifier * * @example * const data = await store.read('sess_abc
src/stores/file.ts:124
Method
read
* Reads session data from Redis * * @param sessionId - Session identifier * * @example * const data = await store.read('sess_abc123')
src/stores/redis.ts:173
Method
read
* Reads session data from DynamoDB * * @param sessionId - Session identifier * * @example * const data = await store.read('sess_abc123'
src/stores/dynamodb.ts:112
Method
read
* Reads session value from memory * * @param sessionId - Session identifier * * @example * const data = store.read('sess_abc123')
src/stores/memory.ts:39
Method
read
* Reads session data from the database * * @param sessionId - Session identifier * * @example * const data = await store.read('sess_abc
src/stores/database.ts:174
Method
readonly
* Returns true if the session is in readonly state
src/session.ts:105
Method
run
()
commands/make_session_table.ts:20
Method
sessionId
* Gets the session id for the current HTTP request
src/session.ts:91
Method
tag
* 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
Method
tag
* 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
Method
tag
* 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
Method
tag
* 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
Method
tag
* 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
Method
tagged
* 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
Method
tagged
* Get all sessions for a given user ID (tag) * * @param userId - User identifier to get sessions for
src/stores/redis.ts:304
Method
tagged
* Get all sessions for a given user ID (tag) * * @param userId - User identifier to get sessions for
src/stores/memory.ts:101
Method
tagged
* 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
Method
touch
* Updates the session expiry by updating the file's modification time * * @param sessionId - Session identifier * * @example * await st
src/stores/file.ts:231
Method
touch
* Updates the session expiry time in Redis * * @param sessionId - Session identifier * * @example * await store.touch('sess_abc123')
src/stores/redis.ts:262
Method
touch
* Updates the session expiry time in DynamoDB * * @param sessionId - Session identifier * * @example * await store.touch('sess_abc123')
src/stores/dynamodb.ts:216
Method
touch
* No-op for memory store as there's no expiry mechanism * * @param sessionId - Session identifier (unused)
src/stores/memory.ts:74
Method
touch
* Updates the cookie expiry by rewriting it with existing values * * @param sessionId - Session identifier used as cookie name * * @exampl
src/stores/cookie.ts:106
Method
touch
* Updates the session expiry time in the database * * @param sessionId - Session identifier * * @example * await store.touch('sess_abc1
src/stores/database.ts:255
Method
untag
* 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
Method
untag
* 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
Method
untag
* 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
Method
untag
* 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
Method
write
* 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
Method
write
* 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
Method
write
* 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
Method
write
* 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
Method
write
* 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
← previous
101–192 of 192, ranked by callers