MCPcopy Create free account

hub / github.com/adonisjs/session / functions

Functions192 in github.com/adonisjs/session

↓ 24 callersMethodset
* Sets a key/value pair in the store * * @param key - The key or key path to set * @param value - The value to set * * @example * st
src/values_store.ts:167
↓ 23 callersMethodget
* Gets the value of a key from the session datastore. * You can specify a default value to use when key does not exist or has undefined value. *
src/session.ts:325
↓ 20 callersMethodcreate
* Creates an instance of the session middleware
factories/session_middleware_factory.ts:65
↓ 15 callersMethoddestroy
* Removes session data for a given session ID from the persistence store * * @param sessionId - Unique identifier for the session to remove
src/types.ts:94
↓ 15 callersMethodmerge
* Merges session data with existing values * * @param values - Session data to merge * * @example * client.merge({ userId: 123, theme:
src/client.ts:69
↓ 13 callersMethodread
* Reads session data for a given session ID from the persistence store * * @param sessionId - Unique identifier for the session
src/types.ts:79
↓ 13 callersMethodwrite
* Writes session data for a given session ID to the persistence store * * @param sessionId - Unique identifier for the session * @param data
src/types.ts:87
↓ 11 callersMethodall
* Gets everything from the session store * * @example * const allData = session.all() * console.log(allData) // { username: 'john', theme:
src/session.ts:336
↓ 11 callersMethodhas
* Checks if a key exists inside the datastore * * @param key - The key to check for existence * * @example * if (session.has('username'
src/session.ts:310
↓ 10 callersMethodflash
(key: string | SessionData, value?: AllowedSessionValues)
src/session.ts:419
↓ 9 callersMethod#getValuesStore
* Returns the store instance for a given mode * * @param mode - Access mode ('write' or 'read')
src/session.ts:213
↓ 8 callersMethod#getFlashStore
* Returns the flash messages store for a given mode * * @param mode - Access mode ('write' or 'read')
src/session.ts:164
↓ 8 callersMethodcommit
* Commits session changes. No more mutations will be allowed after commit. * * @example * await session.commit() // Save all changes to the s
src/session.ts:713
↓ 8 callersFunctiondefineConfig
( config: ConfigInput<KnownStores> )
src/define_config.ts:72
↓ 8 callersMethodput
* Puts a key-value pair to the session data store * * @param key - The key to store the value under * @param value - The value to store *
src/session.ts:296
↓ 8 callersMethodtouch
* Updates the lifetime/expiry of a session without modifying the session data * * @param sessionId - Unique identifier for the session to touch
src/types.ts:101
↓ 7 callersMethodtag
* Associates a session with a user ID (tag). * This allows querying all sessions for a specific user.
src/types.ts:127
↓ 7 callersMethodupdate
* Overwrites existing store data with new values * * @param values - New values to replace existing data * * @example * store.update({
src/values_store.ts:249
↓ 6 callersMethodboot
* Adding edge tags (if edge is installed)
providers/session_provider.ts:82
↓ 6 callersMethodclear
* Empties the session store * * @example * session.clear() // Removes all session data
src/session.ts:403
↓ 6 callersMethodinitiate
* Initiates the session store. The method results in a noop when called multiple times. * * @param readonly - Whether to initiate the session in
src/session.ts:234
↓ 5 callersMethod#getTagKey
* Returns the Redis key for a user's tag set. * The tag set stores all session IDs associated with a user. * * @param userId - User identifie
src/stores/redis.ts:130
↓ 5 callersMethodpull
* Reads value for a key from the session datastore and removes it simultaneously * * @param key - The key to pull * @param defaultValue - Def
src/session.ts:363
↓ 5 callersMethodtagged
* Returns all sessions associated with a given user ID (tag). * Only returns non-expired sessions.
src/types.ts:138
↓ 5 callersMethoduntag
* Dissociate a session from the user ID (tag).
src/types.ts:132
↓ 4 callersMethod#getFilePath
* Returns the absolute file path for a session ID. * Session files are stored with .txt extension in the configured location. * * @param sess
src/stores/file.ts:64
↓ 4 callersMethodget
* Gets value for a given key * * @param key - The key or key path to retrieve * @param defaultValue - Default value if key doesn't exist *
src/values_store.ts:55
↓ 4 callersMethodshouldFlashValue
* Determines whether a value should be stored in flash messages. * Objects can opt out by setting a STORE_IN_FLASH symbol property to false. *
src/session.ts:182
↓ 3 callersMethodall
* Gets all values from the store * * @example * const allData = store.all()
src/values_store.ts:90
↓ 3 callersMethodincrement
* Increments the value of a key inside the session store. * A new key will be defined if it doesn't exist already with value 1. * * @param ke
src/session.ts:378
↓ 3 callersMethodload
* Loads session data from the session store * * @param sessionId - Optional session ID to load (defaults to current session) * * @example
src/client.ts:127
↓ 3 callersMethodsetIntendedUrl
* Store a URL as the intended redirect destination. The URL is * validated using `isValidRedirectUrl` before storing. Invalid * URLs are silentl
src/session.ts:667
↓ 3 callersMethodtoJSON
* Returns the store values as JSON-serializable data * * @example * const json = store.toJSON()
src/values_store.ts:110
↓ 3 callersMethodtoString
* Returns string representation of the store * * @example * const str = store.toString()
src/values_store.ts:120
↓ 3 callersMethodunset
* Removes a key from the store * * @param key - The key or key path to remove * * @example * store.unset('temp_data') * store.unset(
src/values_store.ts:181
↓ 2 callersMethod#getApp
()
factories/session_middleware_factory.ts:33
↓ 2 callersMethod#parseSessionData
* Verifies and parses session data from string format. * Returns null if the contents is not valid JSON or verification fails. * * @param con
src/stores/redis.ts:141
↓ 2 callersMethod#parseSessionData
* Parses and verifies session data from string format. * Returns null if the data is corrupted or verification fails. * * @param contents - S
src/stores/database.ts:125
↓ 2 callersMethodcleanupFlashData
* Filters flash data to only include values that should be flashed. * Removes values that have opted out of flash storage. * * @param data -
src/session.ts:195
↓ 2 callersFunctioncreateTestStore
(config: ResolvedSessionConfig)
src/plugins/japa/store.ts:23
↓ 2 callersMethoddecrement
* Decrements the value of a key inside the session store. * A new key will be defined if it doesn't exist already with value -1. * * @param k
src/session.ts:393
↓ 2 callersMethodflashErrors
* Flashes errors to the errorsBag. You can read these errors via the "@error" tag. * Appends new messages to the existing collection. * * @pa
src/session.ts:441
↓ 2 callersMethodflashExcept
* Flashes form input data (except some keys) to the flash messages store * * @param keys - Array of keys to exclude from flashing * * @exa
src/session.ts:546
↓ 2 callersMethodflashMessages
* Get flash messages from the HTTP response
src/plugins/japa/api_client.ts:52
↓ 2 callersMethodflashValidationErrors
* Flashes validation error messages. Make sure the error is an instance of VineJS ValidationException. * Overrides existing inputErrors. * *
src/session.ts:486
↓ 2 callersMethodforget
* Removes a key from the session datastore * * @param key - The key to remove * * @example * session.forget('temp_data') * session.f
src/session.ts:349
↓ 2 callersMethodgetIntendedUrl
* Returns the intended URL without consuming it, or `null` * if no intended URL is stored.
src/session.ts:678
↓ 2 callersMethodinitiateSession
* Initiate session. The session id cookie will be defined * if missing
src/plugins/japa/browser_client.ts:30
↓ 2 callersMethodpullIntendedUrl
* Returns the intended URL and removes it from the session, * or `null` if no intended URL is stored.
src/session.ts:686
↓ 2 callersFunctionrunJapaTest
(app: ApplicationService, callback: Parameters<Test['run']>[0])
tests_helpers/index.ts:40
↓ 2 callersMethodsession
* Get session data from the HTTP response
src/plugins/japa/api_client.ts:47
↓ 2 callersMethodsupportsTagging
* Checks if the current store supports session tagging. * Only Memory, Redis, and Database stores support tagging. * * @example * const co
src/session_collection.ts:69
↓ 2 callersMethodsupportsTagging
* Checks if the current store supports session tagging. * Only Memory, Redis, and Database stores support tagging. * * @example * if (sess
src/session.ts:621
↓ 1 callersMethod#cleanupInvalidSessions
* Removes invalid session IDs from the user's tag set. * Cleans up expired or corrupted session references. * * @param userId - User identifi
src/stores/redis.ts:118
↓ 1 callersMethod#collectGarbage
* Runs garbage collection to delete expired sessions from the database. * Executes probabilistically based on gcProbability setting after writing s
src/stores/database.ts:105
↓ 1 callersMethod#fetchSessionContents
* Fetches session contents for multiple session IDs using a Redis pipeline. * Optimizes performance by batching multiple GET commands into a single
src/stores/redis.ts:103
↓ 1 callersMethod#getEmitter
()
factories/session_middleware_factory.ts:37
↓ 1 callersMethod#outputFile
* Writes file contents to the given path. * Creates parent directories recursively if they don't exist. * * @param path - File path to write
src/stores/file.ts:105
↓ 1 callersMethod#pathExists
* Checks if a file or directory exists at the given path. * Returns true if accessible, false otherwise. * * @param path - File or directory
src/stores/file.ts:74
↓ 1 callersMethod#processSessionResult
* Processes a single session result from the pipeline. * Parses session data and determines validity. * * @param options - Session ID and con
src/stores/redis.ts:85
↓ 1 callersMethod#resolveConfig
* Resolves the session config from the config provider
providers/session_provider.ts:51
↓ 1 callersMethod#rowToTaggedSession
* Converts a database row to a TaggedSession object. * Parses the session data and returns null if parsing fails. * * @param row - Database r
src/stores/database.ts:157
↓ 1 callersMethod#serializeSessionData
* Encrypts or signs the session data for the session id * * @param values - Session data to serialize * @param sessionId - Session identifier
src/stores/redis.ts:158
↓ 1 callersMethod#serializeSessionData
* Encrypts or signs the session data for the session id * * @param values - Session data to serialize * @param sessionId - Session identifier
src/stores/database.ts:142
↓ 1 callersMethod#stats
* Returns file statistics for the given path. * Returns null if the file doesn't exist or is inaccessible. * * @param path - File path to get
src/stores/file.ts:89
↓ 1 callersMethodassertDoesNotHaveValidationError
* Assert flash messages does not have validation errors * for the given field
src/plugins/japa/api_client.ts:89
↓ 1 callersMethodassertFlashMessage
* Assert flash message key-value pair exists
src/plugins/japa/api_client.ts:72
↓ 1 callersMethodassertFlashMissing
* Assert key is missing flash messages store
src/plugins/japa/api_client.ts:77
↓ 1 callersMethodassertSession
* Assert session key-value pair exists
src/plugins/japa/api_client.ts:62
↓ 1 callersMethodassertSessionMissing
* Assert key is missing in session store
src/plugins/japa/api_client.ts:67
↓ 1 callersMethodassertValidationError
* Assert error message for a given field
src/plugins/japa/api_client.ts:94
↓ 1 callersMethodassertValidationErrors
* Assert all error messages for a given field
src/plugins/japa/api_client.ts:99
↓ 1 callersMethodclearIntendedUrl
* Removes the intended URL from the session.
src/session.ts:693
↓ 1 callersFunctionconfigure
(command: Configure)
configure.ts:29
↓ 1 callersFunctioncreateConfigureCommand
* Creates the configure command for the package inside a * minimal application scaffolded on the filesystem
tests/configure.spec.ts:22
↓ 1 callersFunctioncreateDatabase
()
tests/stores/database_store.spec.ts:53
↓ 1 callersFunctioncreateFakeConfig
(store: SessionStoreContract)
tests/session_collection.spec.ts:16
↓ 1 callersFunctioncreateStore
()
src/plugins/japa/store.ts:24
↓ 1 callersMethoddestroy
* Removes session data from the database * * @param sessionId - Session identifier to remove * * @example * await store.destroy('sess_a
src/stores/database.ts:241
↓ 1 callersMethodflashAll
* Flashes all form input data to the flash messages store * * @example * session.flashAll() // Flashes all request input for next request
src/session.ts:533
↓ 1 callersMethodflashInputErrors
* Flashes error messages for form fields to the inputErrorsBag, the same * bag "flashValidationErrors" fills. The "@inputError" tag and the Inertia
src/session.ts:456
↓ 1 callersMethodflashMessage
* Get flash messages for a specific key from the HTTP response
src/plugins/japa/api_client.ts:57
↓ 1 callersMethodflashOnly
* Flashes form input data (only some keys) to the flash messages store * * @param keys - Array of keys to include in flashing * * @example
src/session.ts:566
↓ 1 callersFunctiongetExpiry
( client: DynamoDBClient, tableName: string, key: string, sessionId: string )
tests_helpers/index.ts:107
↓ 1 callersMethodgetFlashMessages
* Returns data from the session store
src/plugins/japa/browser_client.ts:40
↓ 1 callersFunctiongetSession
( client: DynamoDBClient, tableName: string, key: string, sessionId: string )
tests_helpers/index.ts:83
↓ 1 callersMethodgetSession
* Returns data from the session store
src/plugins/japa/browser_client.ts:35
↓ 1 callersFunctiongetSessionCookieOptions
* Transforms AdonisJS session config to playwright cookie options * * @param config - Session configuration * @param cookieOptions - Optional cooki
src/plugins/japa/browser_client.ts:83
↓ 1 callersMethodhandle
* Handles the HTTP request by initializing session and committing changes * * @param ctx - HTTP context * @param next - Next middleware funct
src/session_middleware.ts:155
↓ 1 callersMethodpull
* Pulls value from the store. Same as calling store.get then store.unset. * * @param key - The key or key path to pull * @param defaultValue
src/values_store.ts:196
↓ 1 callersMethodread
* Reads session value from the encrypted cookie * * @param sessionId - Session identifier used as cookie name * * @example * const data
src/stores/cookie.ts:58
↓ 1 callersMethodreflash
* Reflashes messages from the last request in the current response * * @example * session.reflash() // Keep all flash messages for another re
src/session.ts:584
↓ 1 callersMethodreflashExcept
* Reflashes messages (except some keys) from the last request in the current response * * @param keys - Array of keys to exclude from reflashing
src/session.ts:608
↓ 1 callersMethodreflashOnly
* Reflashes messages (only some keys) from the last request in the current response * * @param keys - Array of keys to reflash * * @exampl
src/session.ts:596
↓ 1 callersMethodregenerate
* Re-generates the session id and migrates data to it * * @example * session.regenerate() // Generates new session ID for security
src/session.ts:703
↓ 1 callersMethodregister
* Registering bindings
providers/session_provider.ts:66
↓ 1 callersMethodregisterEdgePlugin
* Registers edge plugin when edge is installed * in the user application.
providers/session_provider.ts:40
↓ 1 callersFunctionrequestHandler
* Re-usable request handler that creates different session scanerios * based upon the request URL.
tests/concurrent_session.spec.ts:59
↓ 1 callersFunctionsessionApiClient
(app: ApplicationService)
src/plugins/japa/api_client.ts:124
↓ 1 callersFunctionsessionBrowserClient
(app: ApplicationService)
src/plugins/japa/browser_client.ts:112
next →1–100 of 192, ranked by callers