Package io.ktor.sessions
Types
Cookie configuration being used to send sessions
Cookie session configuration builder
Cookie session configuration builder
Represents a container for all session instances
Header session configuration builder
Header session configuration builder
This exception is thrown when a session is asked too early before the Sessions feature had chance to configure it. For example, in a phase before ApplicationCallPipeline.Features or in a feature installed before Sessions into the same phase.
Sessions feature that provides a mechanism to persist information between requests.
Serializes session from and to String
Default reflection-based session serializer that does it via reflection. Serialized format is textual and optimized for size as it is could be transferred via HTTP headers or cookies
Represents a way to write, read and invalidate session bits.
SessionStorage that stores session contents into memory.
SessionTracker provides ability to track and extract session from the call context.
SessionTracker that transfers a Session Id generated by a sessionIdProvider in HTTP Headers/Cookies. It uses a storage and a serializer to store/load serialized/deserialized session content of a specific type.
SessionTracker that stores the contents of the session as part of HTTP Cookies/Headers. It uses a specific serializer to serialize and deserialize objects of type type.
SessionTransport receive, send or clear a session from/to an ApplicationCall.
SessionTransport that adds a Set-Cookie header and reads Cookie header for the specified cookie name, and a specific cookie configuration after applying/un-applying the specified transforms defined by transformers.
SessionTransport that sets or gets the specific header name, applying/un-applying the specified transforms defined by transformers.
Represents a session cookie transformation. Useful for such things like signing and encryption
Session transformer that encrypts/decrypts the input.
This exception is thrown when HTTP response has already been sent but an attempt to modify session is made
Functions
Creates the the default SessionSerializer for type T
Creates the default SessionSerializer for class type
Clear session instance with type T
Configure sessions to serialize to/from HTTP cookie
Configure sessions to get it from cookie using session storage
Configures a session using a cookie with the specified name using it as for the actual session content optionally transformed by specified transforms in block. The cookie configuration can be set inside block using the cookie property exposed by CookieIdSessionBuilder.
Configures a session using a cookie with the specified name using it as a session id. The actual content of the session is stored at server side using the specified storage. The cookie configuration can be set inside block using the cookie property exposed by CookieIdSessionBuilder.
Configure sessions to serialize to/from HTTP cookie configuring it by block
Creates the default SessionSerializer for type T
Creates the default SessionSerializer by typeInfo
Generates a secure random session ID
Configure sessions to serialize to/from HTTP header
Configure sessions to get it from HTTP header using session storage
Configures a session using a header with the specified name using it for the actual session content optionally transformed by specified transforms in block.
Configures a session using a header with the specified name using it as a session id. The actual content of the session is stored at server side using the specified storage.
Returns the corresponding session ID for the type SessionType or null
if no session provided. It will crash if no session provider for type SessionType installed or no Sessions feature installed.
Un-applies a list of session transformations to a cookieValue representing a transformed session string. If any of the unapplication of transformations fail returning a null, this function also returns null.
Applies a list of session transformations to a value representing session string.