Hoogle Search

Within LTS Haskell 24.68 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. setSecureCookies :: Bool -> State sto -> State sto

    serversession Web.ServerSession.Core.Internal

    Set whether cookies should be mared "Secure" (True) or not (False). Cookies marked as "Secure" are not sent via plain HTTP connections, only via HTTPS connections. It's highly recommended to set this attribute to True. However, since many sites do not operate over HTTPS, the default is False. Defaults to False.

  2. setTimeoutResolution :: Maybe NominalDiffTime -> State sto -> State sto

    serversession Web.ServerSession.Core.Internal

    Set the timeout resolution. We need to save both the creation and last access times on sessions in order to implement idle and absolute timeouts. This means that we have to save the updated session on the storage backend even if the request didn't change any session variable, if only to update the last access time. This setting provides an optimization where the session is not updated on the storage backend provided that:

    • No session variables were changed.
    • The difference between the current time and the last saved access time is less than the timeout resolution.
    For example, with a timeout resolution of 1 minute, every request that does not change the session variables within 1 minute of the last update will not generate any updates on the storage backend. If the timeout resolution is Nothing, then this optimization becomes disabled and the session will always be updated. Defaults to 10 minutes.

  3. setAbsoluteTimeout :: Maybe NominalDiffTime -> State sto -> State sto

    serversession-frontend-wai Web.ServerSession.Frontend.Wai

    Set the absolute timeout for all sessions. This is used both on the client side (by setting the cookie expires fields) and on the server side (the absolute timeout is enforced even if the cookie expiration is ignored). Setting to Nothing removes the absolute timeout entirely. "[The absolute timeout] defines the maximum amount of time a session can be active, closing and invalidating the session upon the defined absolute period since the given session was initially created by the web application. After invalidating the session, the user is forced to (re)authenticate again in the web application and establish a new session." (Source) Defaults to 60 days.

  4. setAuthKey :: Text -> State sto -> State sto

    serversession-frontend-wai Web.ServerSession.Frontend.Wai

    Set the name of the session variable that keeps track of the logged user. This setting is used by session data types that are Map-alike, using a lookup function. However, the IsSessionData instance of a session data type may choose not to use it. For example, if you implemented a custom data type, you could return the AuthId without needing a lookup. Defaults to "_ID" (used by yesod-auth).

  5. setCookieName :: Text -> State sto -> State sto

    serversession-frontend-wai Web.ServerSession.Frontend.Wai

    Set the name of cookie where the session ID will be saved. Defaults to "JSESSIONID", which is a generic cookie name used by many frameworks thus making it harder to fingerprint this implementation.

  6. setHttpOnlyCookies :: Bool -> State sto -> State sto

    serversession-frontend-wai Web.ServerSession.Frontend.Wai

    Set whether cookies should be HTTP-only (True) or not (False). Cookies marked as HTTP-only ("HttpOnly") are not accessible from client-side scripting languages such as JavaScript, thus preventing a large class of XSS attacks. It's highly recommended to set this attribute to True. Defaults to True.

  7. setIdleTimeout :: Maybe NominalDiffTime -> State sto -> State sto

    serversession-frontend-wai Web.ServerSession.Frontend.Wai

    Set the idle timeout for all sessions. This is used both on the client side (by setting the cookie expires fields) and on the server side (the idle timeout is enforced even if the cookie expiration is ignored). Setting to Nothing removes the idle timeout entirely. "[The idle timemout] defines the amount of time a session will remain active in case there is no activity in the session, closing and invalidating the session upon the defined idle period since the last HTTP request received by the web application for a given session ID." (Source) Defaults to 7 days.

  8. setPersistentCookies :: Bool -> State sto -> State sto

    serversession-frontend-wai Web.ServerSession.Frontend.Wai

    Set whether by default cookies should be persistent (True) or non-persistent (False). Persistent cookies are saved across browser sessions. Non-persistent cookies are discarded when the browser is closed. If you set cookies to be persistent and do not define any timeouts (setIdleTimeout or setAbsoluteTimeout), then the cookie is set to expire in 10 years. Defaults to True.

  9. setSecureCookies :: Bool -> State sto -> State sto

    serversession-frontend-wai Web.ServerSession.Frontend.Wai

    Set whether cookies should be mared "Secure" (True) or not (False). Cookies marked as "Secure" are not sent via plain HTTP connections, only via HTTPS connections. It's highly recommended to set this attribute to True. However, since many sites do not operate over HTTPS, the default is False. Defaults to False.

  10. setTimeoutResolution :: Maybe NominalDiffTime -> State sto -> State sto

    serversession-frontend-wai Web.ServerSession.Frontend.Wai

    Set the timeout resolution. We need to save both the creation and last access times on sessions in order to implement idle and absolute timeouts. This means that we have to save the updated session on the storage backend even if the request didn't change any session variable, if only to update the last access time. This setting provides an optimization where the session is not updated on the storage backend provided that:

    • No session variables were changed.
    • The difference between the current time and the last saved access time is less than the timeout resolution.
    For example, with a timeout resolution of 1 minute, every request that does not change the session variables within 1 minute of the last update will not generate any updates on the storage backend. If the timeout resolution is Nothing, then this optimization becomes disabled and the session will always be updated. Defaults to 10 minutes.

Page 1026 of many | Previous | Next