!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~       %#IGiven a set of roles to check, and a set of implication rules describing M how a given role inherits from other roles, this function produces a stream A of expanded Roles. If a Role is seen twice, expandRoles mzeros.      #     #     "Arbitrary payload with timestamp.  Cookie name Encryption key Timeout in seconds Inject the payload  Cookie name Encryption key Max age in seconds Serializable payload )Validate session against timeout policy.  If timeout is set to , never trigger a time-out. K * Othwerwise, do a regular time-out check based on current time and given  timestamp. Serialize UTCTime (Generates a random salt of given length !Generate a randomized CSRF token  #Load a session from given payload. IWill always be called before any other operation. If possible, cache and F do nothing when called multiple times within the same request cycle.  2Commit session, return a possibly updated paylaod !Reset session "Touch session #%Insert a key-value pair into session $Lookup a key in session %Delete a key in session &5Return a session-specific CSRF protection token. See  mkCSRFToken for  help in creating the value. '2Return all key-value pairs as an association list +Any Haskell record that is a member of the  typeclass  can be stuffed inside a  to enable all session-related  functionality. (  !"#$%&'(   !"#$%&' !"#$%&'((06Authetication settings defined at initialization time Currently not used/checked $Name of the desired remember cookie AHow long to remember when the option is used in rest of the API.  & means remember until end of session. Lockout strategy: ([MaxAttempts], [LockoutDuration]) Location of app's encryption key =Type representing the concept of a User in your application. 9This will be replaced by a role-based permission system.  Internal representation of a User$. By convention, we demand that the ) application is able to directly fetch a User using this identifier. HThink of this type as a secure, authenticated user. You should normally ; never see this type unless a user has been authenticated. !"#HAuthentication failures indicate what went wrong during authentication. F They may provide useful information to the developer, although it is L generally not advisable to show the user the exact details about why login  failed. $%Locked out until given time &'()EPassword is clear when supplied by the user and encrypted later when  returned from the db. *+,-.,Default AuthUser that has all empty values. /@Set a new password for the given user. Given password should be ) clear-text; it will be encrypted into a *. 0Default settings for Auth.  asMinPasswdLen = 8 $ asRememberCookieName = "_remember" 2 asRememberPeriod = Just (2*7*24*60*60) = 2 weeks  asLockout = Nothing  asSiteKey = "site_key.txt" 0  !"#$%&'()*+,-./00     !"!"#('&%$$%&'()+**+,-./0J1Snaplet's type parameter s- here is user-defined and can be any Haskell  type. A value of type  Snaplet s countains a couple of things:  a value of type s , called the " user state". H some bookkeeping data the framework uses to plug things together, like  the snaplet's configuration, the snaplet's root directory on the  filesystem, the snaplet's root URL, and so on. )*+2HAn opaque data type holding internal snaplet configuration data. It is H exported publicly because the getOpaqueConfig function in MonadSnaplet C makes implementing new instances of MonadSnaplet more convenient. ,-./0123CHolds the actual route pattern passed to addRoutes for the current E handler. Nothing during initialization and before route dispatech. 452Joins a reversed list of directories into a path. 62Joins a reversed list of directories into a path. 3&Monad used for initializing snaplets. 78DWrapper around IO actions that modify state elements created during  initialization. 9:@Information about a partially constructed initializer. Used to 7 automatically aggregate handlers and cleanup actions. ;<=>-Handler routes built up and passed to route. ?Generic filtering of handlers @CThis snaplet config is the incrementally built config for whatever ) snaplet is currently being constructed. A4FSnaplet infrastructure is available during runtime request processing ' through the Handler monad. There aren'$t very many standalone functions to G read about here, but this is deceptive. The key is in the type class ' instances. Handler is an instance of B, which means it is the I monad you will use to write all your application routes. It also has a  5; instance, which gives you all the functionality described  above. C5CThe m type parameter used in the MonadSnaplet type signatures will M usually be either Initializer or Handler, but other monads may sometimes be  useful. Minimal complete definition:  9, 8, :, and ;. 62Runs a child snaplet action in the current snaplet's context. If you G think about snaplet lenses using a filesystem path metaphor, the lens H supplied to this snaplet must be a relative path. In other words, the  lens'6s base state must be the same as the current snaplet. &A relative lens identifying a snaplet Action from the lense' s snaplet 7Like 6 but doesn')t impose the requirement that the action I being run be a descendant of the current snaplet. Using our filesystem @ metaphor again, the lens for this function must be an absolute  path--it'-s base must be the same as the current base. An "absolute" lens identifying a snaplet Action from the lense' s snaplet 8 A variant of 63 accepting a lens from snaplet to snaplet. Unlike  the lens used in the above 6% function, this lens formulation has C an identity, which makes it useful in certain circumstances. The  lenses generated by D# will not work with this function,  however the lens returned by : will.  with = with' . subSnaplet9The absolute version of 8 :'Gets the lens for the current snaplet. ;Gets the current snaplet's opaque config data type. You' ll only use 4 this function when writing MonadSnaplet instances. EFGHIJKL<BA lens referencing the opaque SnapletConfig data type held inside  Snaplet. =EA lens referencing the user-defined state type wrapped by a Snaplet. >ITransforms a lens of the type you get from makeLenses to an similar lens ) that is more suitable for internal use. ?FGets a list of the names of snaplets that are direct ancestors of the  current snaplet. @Gets the snaplet's path on the filesystem. AGets the current snaple's name. B2Gets a human readable description of the snaplet. C8Gets the config data structure for the current snaplet. DEGets the base URL for the current snaplet. Directories get added to & the current snaplet path by calls to  nestSnaplet. E Gets the  Snaplet v from the current snaplet' s state. F Puts a new  Snaplet v in the current snaplet' s state. G Modifies the  Snaplet v in the current snaplet' s state. H Gets the  Snaplet v from the current snaplet's state and applies a  function to it. IIGets the route pattern that matched for the handler. This lets you find A out exactly which of the strings you used in addRoutes matched. JGSets the route pattern that matched for the handler. Use this when to F override the default pattern which is the key to the alist passed to  addRoutes. KHandler that reloads the site. M?The MonadState instance gives you access to the current snaplet' s state. NHInformation needed to reload a site. Instead of having snaplets define M their own reload actions, we store the original site initializer and use it  instead. OPQLGOpaque newtype which gives us compile-time guarantees that the user is E using makeSnaplet and either nestSnaplet or embedSnaplet correctly. RSTUVWXI1)*+2,-./01234563789:;<=>?@A4C56789:;EFGHIJKL<=>?@ABCDEFGHIJKNOPQLRSTUVWXI1)*+)*+2 ,-./01234,-./0123456377899:;<=>?@A;<=>?@A4CC56789:;6789:;EFGHIJKL<=>?@ABCDEFGHIJKNOPQOPQLRRSTUVWX YZ for InitializerState. [\ for InitializerState. ]^ for InitializerState. _+Converts a plain hook into a Snaplet hook. MGAdds an IO action that modifies the current snaplet state to be run at I the end of initialization on the state that was created. This makes it  easier to allow one snaplet')s state to be modified by another snaplet's K initializer. A good example of this is when a snaplet has templates that 3 define its views. The Heist snaplet provides the  addTemplates function = which allows other snaplets to set up their own templates.  addTemplates % is implemented using this function. `NJVariant of addPostInitHook for when you have things wrapped in a Snaplet. a(Helper function for transforming hooks. b(Helper function for transforming hooks. cModifies the Initializer's SnapletConfig. dIIf a snaplet has a filesystem presence, this function creates and copies  the files if they dont' already exist. The directory where the snaplet's reference files are & stored. Nothing if the snaplet doesn't come with any files  that need to be installed. ,Directory where the files should be copied. O6All snaplet initializers must be wrapped in a call to  makeSnaplet, A which handles standardized housekeeping common to all snaplets. ' Common usage will look something like  this:    fooInit :: SnapletInit b Foo  fooInit = makeSnaplet "foo" "An example snaplet" Nothing $ do # -- Your initializer code here  return $ Foo 42  Note that you';re writing your initializer code in the Initializer monad, K and makeSnaplet converts it into an opaque SnapletInit type. This allows E us to use the type system to ensure that the API is used correctly. ;A default id for this snaplet. This is only used when the D end-user has not already set an id using the nameSnaplet function. .A human readable description of this snaplet. -The path to the directory holding the snaplet' s reference ? filesystem content. This will almost always be the directory  returned by Cabal'1s getDataDir command, but it has to be passed in C because it is defined in a package-specific import. Setting this  value to Nothing doesn',t preclude the snaplet from having files in / in the filesystem, it just means that they won't be copied there  automatically. Snaplet initializer. eEInternal function that gets the SnapletConfig out of the initializer , state and uses it to create a (Snaplet a). fCBrackets an initializer computation, restoring curConfig after the  computation returns. gGHandles modifications to InitializerState that need to happen before a < snaplet is called with either nestSnaplet or embedSnaplet. PRuns another snaplet'2s initializer and returns the initialized Snaplet J value. Calling an initializer with nestSnaplet gives the nested snaplet L access to the same base state that the current snaplet has. This makes it I possible for the child snaplet to make use of functionality provided by  sibling snaplets.  The root url for all the snaplet's routes. An empty string 5 gives the routes the same root as the parent snaplet' s routes. Lens identifying the snaplet -The initializer function for the subsnaplet. QRuns another snaplet'2s initializer and returns the initialized Snaplet G value. The difference between this and nestSnaplet is the first type ' parameter in the third argument. The "v1 v1" makes the child snaplet I think that it is top-level, which means that it will not be able to use K functionality provided by snaplets included above it in the snaplet tree. M This strongly isolates the child snaplet, and allows you to eliminate the b M type variable. The embedded snaplet can still get functionality from other > snaplets, but only if it nests or embeds the snaplet itself.  The root url for all the snaplet's routes. An empty string 5 gives the routes the same root as the parent snaplet' s routes. 4NOTE: Because of the stronger isolation provided by ? embedSnaplet, you should be more careful about using an empty  string here. Lens identifying the snaplet -The initializer function for the subsnaplet. h*Changes the base state of an initializer. i%Changes the base state of a handler. RSets a snaplet'5s name. All snaplets have a default name set by the L snaplet author. This function allows you to override that name. You will H have to do this if you have more than one instance of the same kind of C snaplet because snaplet names must be unique. This function must ! immediately surround the snaplet's initializer. For example:  fooState <- nestSnaplet "fooA" $ nameSnaplet "myFoo" $ fooInitThe snaplet name !The snaplet initializer function SAdds routing to the current 4". The new routes are merged with M the main routing section and take precedence over existing routing that was  previously defined. TWraps the snaplet'7s routing. This can be used to provide a snaplet that L does per-request setup and cleanup, but then dispatches to the rest of the  application. jUGAttaches an unload handler to the snaplet. The unload handler will be 4 called when the server shuts down, or is reloaded. kVEInitializers should use this function for all informational or error L messages to be displayed to the user. On application startup they will be J sent to the console. When executed from the reloader, they will be sent ( back to the user in the HTTP response. l<Builds an IO reload action for storage in the SnapletState. m,Runs a top-level snaplet in the Snap monad. nWJGiven a Snaplet initializer, produce the set of messages generated during 7 initialization, a snap handler, and a cleanup action. XFGiven a configuration and a snap handler, complete it and produce the L completed configuration as well as a new toplevel handler with things like ' compression and a 500 handler set up. YDServes a top-level snaplet as a web application. Reads command-line " arguments. FIXME: document this. _MNcOfPQRSTUVnWXY_MNcOfPQRSTUVnWXYZ?This function derives all the information necessary to use the C interpreter from the compile-time environment, and compiles it in  to the generated code. 8This could be considered a TH wrapper around a function  > loadSnap :: Typeable a => IO a -> (a -> IO (Snap (), IO ())) > -> [String] -> IO (a, Snap (), IO ()) +with a magical implementation. The [String] argument is a list of : directories to watch for updates to trigger a reloading. B Directories containing code should be automatically picked up by  this splice. @The generated splice executes the initialiser once, sets up the ? interpreter for the load function, and returns the initializer's " result along with the interpreter's proxy handler and cleanup D actions. The behavior of the proxy actions will change to reflect C changes in the watched files, reinterpreting the load function as 3 needed and applying it to the initializer result. @This will handle reloading the application successfully in most < cases. The cases in which it is certain to fail are those = involving changing the types of the initializer or the load A function, or changing the compiler options required, such as by  changing/"adding dependencies in the project's .cabal file. In / those cases, a full recompile will be needed. the initializer expression the name of the load function +a list of directories to watch in addition  to those containing code ZZZ[@This function provides a non-magical type-compatible loader for @ the one in Snap.Loader.Devel, allowing switching one import to & provide production-mode compilation. 8This could be considered a TH wrapper around a function  > loadSnap :: Typeable a => IO a -> (a -> IO (Snap (), IO ())) > -> [String] -> IO (a, Snap (), IO ()) 3The third argument is unused, and only present for + type-compatibility with Snap.Loader.Devel [[[)123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY)12<=>56789:;?@ABCDIJEFGH3LOPQRUMNVST4KWXY(\Type alias for convenience. ]Monad for working with Heist's API from within a snaplet. o^GThe state for the Heist snaplet. To use the Heist snaplet in your app 0 include this in your application state and use e to initialize J it. The type parameter b will typically be the base state type for your  application. pqrs_JClears data stored by the cache tag. The cache tag automatically reloads H its data when the specified TTL expires, but sometimes you may want to ; trigger a manual reload. This function lets you do that. tRuns the SnapletSplice. u`JLifts a HeistT action into SnapletHeist. Use this with all the functions  from the Heist API. a=Common idiom for the combination of liftHandler and withTop. b#Lifts a Handler into SnapletHeist. c)Lifts a (Handler b b) into SnapletHeist. d'SnapletSplices version of bindSplices. eThe 3 for ^*. This function is a convenience wrapper  around f that uses the default v from Heist + and sets up routes for all the templates. Path to templates fA lower level 3 for ^!. This initializer requires you L to specify the initial TemplateState. It also does not add any routes for K templates, allowing you complete control over which templates get routed. Path to templates Initial TemplateState wJInternal worker function used by variantsof heistInit. This is necessary < because of the divide between SnapletInit and Initializer. x9Path to templates (also the url prefix for their routes) yURL prefix for template routes Path to templates z{|}~(Internal helper function for rendering. Name of the template  Content type Name of the template EMonadSnaplet instance gives us access to the snaplet infrastructure. $This instance is here because we don'#t want the heist package to depend ! on anything from snap packages. \]^_t`abcdefxyz{|}~\]^_t`abcdefxyz{|}~gHA single snaplet should never need more than one instance of Heist as a L subsnaplet. This type class allows you to make it easy for other snaplets 9 to get the lens that identifies the heist snaplet. Here's an example of * how the heist snaplet might be declared: 2 data App = App { _heist :: Snaplet (Heist App) }  mkLabels [''App]  : instance HasHeist App where heistLens = subSnaplet heist  - appInit = makeSnaplet "app" "" Nothing $ do < h <- nestSnaplet "heist" heist $ heistInit "templates"  addSplices myAppSplices  return $ App h h<A lens to the Heist snaplet. The b parameter to Heist will 2 typically be the base state of your application. iFAdds templates to the Heist TemplateState. Other snaplets should use L this function to add their own templates. The templates are automatically 9 read from the templates directory in the current snaplet's filesystem root. 9Path to templates (also the url prefix for their routes) jFAdds templates to the Heist TemplateState, and lets you specify where # they are found in the filesystem. URL prefix for template routes Path to templates k Allows snaplets to add splices. Splices to bind lEMore general function allowing arbitrary TemplateState modification. ! Without this function you wouldn'+t be able to bind more complicated splices  like the cache tag. !TemplateState modifying function m)Runs a function on with the Heist snaplet's . TemplateState function to run nRenders a template as text/*html. If the given template is not found,  this returns empty. Template name oERenders a template as the given content type. If the given template  is not found, this returns empty. Content type to render with Template name p Analogous to  fileServe0. If the template specified in the request path  is not found, it returns empty. q Analogous to fileServeSingle&. If the given template is not found,  this throws an error. Template name rJRenders a template with a given set of splices. This is syntax sugar for > a common combination of heistLocal, bindSplices, and render. Template name Splices to bind s<Runs an action with additional splices bound into the Heist  . Splices to bind Handler to run tRuns a handler with a modified . You might want to use G this if you had a set of splices which were customised for a specific # action. To do that you would do: < heistLocal (bindSplices mySplices) handlerThatNeedsSplices !TemplateState modifying function Handler to run \]^_`abcdefghijklmnopqrst^ghefijlmknopqtsr]\`bcad_ghhijklmnopqrst uHWrap around a handler, committing any changes in the session at the end v;Commit changes to session within the current request cycle w,Set a key-value pair in the current session x#Get a key from the current session y&Remove a key from the current session z3Returns a CSRF Token unique to the current session {/Return session contents as an association list |>Deletes the session cookie, effectively resetting the session }0Touch the session so the timeout gets refreshed "Load the session into the manager uvwxyz{|} uvwxyz{|} uvwxyz{|}~HAbstract data type holding all necessary information for auth operation Storage back-end #A lens pointer to a SessionManager #A per-request logged-in user cache Password length range #Cookie name for the remember token 1Remember period in seconds. Defaults to 2 weeks. 8A unique encryption key used to encrypt remember cookie 6Lockout after x tries, re-allow entry after y seconds 6All storage backends need to implement this typeclass Backend operations may throw s $Needs to create or update the given   record 4Create a new user from just a username and password  May throw a DuplicateLogin! if given username is not unique An auth backend  Username  Password ~~ 4Create a new user from just a username and password  May throw a DuplicateLogin! if given username is not unique 5Check whether a user with the given username exists. The username to be checked FLookup a user by her username, check given password and perform login Username/login for user Should be ClearText Set remember token? DRemember user from the remember token if possible and perform login Logout the active user EReturn the current user; trying to remember from cookie if possible. Convenience wrapper around  rememberUser that returns a bool result Create or update a given user  May throw a  if something goes wrong. Destroy the given user  May throw a  if something goes wrong.  Mutate an   , marking failed authentication (This will save the user to the backend.  Mutate an  $, marking successful authentication (This will save the user to the backend. FAuthenticate and log the user into the current session if successful. LThis is a mid-level function exposed to allow roll-your-own ways of looking  up a user from the database. This function will:  Check the password ) Login the user into the current session  Mark success/7failure of the authentication trial on the user record ,An existing user, somehow looked up from db A ClearText password Login and persist the given   in the active session JMeant to be used if you have other means of being sure that the person is  who she says she is. ,An existing user, somehow looked up from db Set the current user's !  in the active session Remove ! 8 from active session, effectively logging the user out. Get the current user's !  from the active session !Check password for a given user. Returns Nothing if check is successful and an IncorrectPassword error  otherwise Looked up from the back-end Check against this password (Wrap lookups around request-local cache 9Lookup action to perform if request local cache is empty 5Register a new user by specifying login and password Param fields A B& handler that processes a login form. %The request paremeters are passed to  performLogin Username field Password field :Remember field; Nothing if you want no remember function.  Upon failure  Upon success ?Simple handler to log the user out. Deletes user from session. What to do after logging out Require that an authenticated   is present in the current  session. JThis function has no DB cost - only checks to see if a user_id is present  in the current session. -Do this if no authenticated user is present. -Do this if an authenticated user is present. 6Run a function on the backend, and return the result. <This uses an existential type so that the backend type doesn't  escape5 AuthManager. The reason that the type is Handler b ? (AuthManager v) a and not a is because anything that uses the A backend will return an IO something, which you can liftIO, or a > Handler b (AuthManager v) a if it uses other handler things. &The function to run with the handler. >Add all standard auth splices to a Heist-enabled application. !This adds the following splices:  < ifLoggedIn>  < ifLoggedOut> A lens reference to ~ IA splice that can be used to check for existence of a user. If a user is 2 present, this will run the contents of the node. E <ifLoggedIn> Show this when there is a logged in user </ifLoggedIn> GA splice that can be used to check for absence of a user. If a user is 6 not present, this will run the contents of the node. G <ifLoggedOut> Show this when there is a logged in user </ifLoggedOut> V  !"#$%&'()*+,-./0~V~ 0 . !")+*#('&%$,-/Initialize a JSON file backed ~ %Authentication settings for your app  Lens into a  auth snaplet will use !Where to store user data as JSON Load/<create a datafile into memory cache and return the manager. .This data type can be used by itself for batch/non-handler processing. 2A session payload to be stored in a SecureCookie. )The manager data type to be stuffed into  Per request cache for  7A long encryption key used for secure cookie transport #Cookie name for the session system #Session cookies will be considered stale after this many seconds. This is what the ' will be for the CookieSession backend Session data are kept in a  for this backend 0Initialize a cookie-backed session, returning a  to be  stuffed inside your application's state. This  will enable 9 the use of all session storage functionality defined in  Snap.Snaplet.Session !Path to site-wide encryption key Session cookie name ,Session time-out (replay attack protection) "Get the current client-side value Set the client-side value b      !"#$%D&'(\)Z^*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmBnopqrstuvwxyz{|}~123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY !!"#$%&''()*+,-./01234567899::;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsstuvwxyz{|}~     P O   P O           9 9                !"#$%&'()*+,J-.K/012345678L99::;<=>?@ABCMDEFGHIJKLMNOPPQReSTUVWXYZ[\]Z[^_Z[`abcdefghijklmnopuvqrstuvwxyz{|}~v                                                                              DEDE !"Z[#$%$&'(')Z[*++,-./012345A67A68AB9AB:AB;AB<AB=AB>AB?AB@ABAABBABCABDABEABFABGABHABIABJABKABLABMABNABOABPABQABRABSABTABUABVABWABXABYABZAB[AB\AB]AB^AB_AB`ABaABbABcABdABeABfABgABhABiABABjABjABkABkAlmAlnAloAlpAlqAlrAstAsuAsvAswAsxAsyAszAs{As|As}As~AsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsAsnap-0.7Snap.Snaplet.SessionSnap.Snaplet.Auth Snap.SnapletSnap.Loader.DevelSnap.Loader.ProdSnap.Snaplet.Heist#Snap.Snaplet.Auth.Backends.JsonFile+Snap.Snaplet.Session.Backends.CookieSessionSnap.Snaplet.Internal.RSTSnap.Snaplet.Internal.LensedSnap.Snaplet.Internal.LensTData.RBAC.Internal.RoleData.RBAC.Internal.RuleData.RBAC.Internal.TypesData.RBAC.RoleData.RBAC.TypesData.RBAC.Internal.RoleMapData.RBAC.Checker!Snap.Snaplet.Session.SecureCookieSnap.Snaplet.Session.Common#Snap.Snaplet.Session.SessionManagerSnap.Snaplet.Auth.TypesSnap.Snaplet.Internal.Types!Snap.Snaplet.Internal.InitializerSnap.Snaplet.HeistNoClassSnap.Snaplet.Auth.AuthManagerSnap.Snaplet.Auth.HandlersSnap.Snaplet.Auth.SpliceHelpersSnapSessionManager BackendErrorDuplicateLogin AuthSettingsasMinPasswdLenasRememberCookieNameasRememberPeriod asLockout asSiteKeyAuthUseruserId userLogin userPassworduserActivatedAtuserSuspendedAtuserRememberTokenuserLoginCountuserFailedLoginCountuserLockedOutUntiluserCurrentLoginAtuserLastLoginAtuserCurrentLoginIpuserLastLoginIp userCreatedAt userUpdatedAt userRolesuserMetaRoleUserIdunUid AuthFailure AuthError LockedOutPasswordMissingIncorrectPassword UserNotFoundPassword Encrypted ClearTextencryptPassword checkPassword defAuthUser setPassworddefAuthSettingsSnaplet SnapletConfig InitializerHandler MonadSnapletwithwithTopwith'withTop'getLensgetOpaqueConfig snapletConfig snapletValue subSnapletgetSnapletAncestrygetSnapletFilePathgetSnapletNamegetSnapletDescriptiongetSnapletUserConfiggetSnapletRootURLgetSnapletStateputSnapletStatemodifySnapletStategetsSnapletStategetRoutePatternsetRoutePattern reloadSite SnapletInitaddPostInitHookaddPostInitHookBase makeSnaplet nestSnaplet embedSnaplet nameSnaplet addRoutes wrapHandlersonUnload printInfo runSnaplet combineConfig serveSnaplet loadSnapTH SnapletSplice SnapletHeistHeistclearHeistCache liftHeistliftWith liftHandlerliftAppHandlerbindSnapletSplices heistInit heistInit'HasHeist heistLens addTemplatesaddTemplatesAt addSplices modifyHeistTS withHeistTSrenderrenderAs heistServeheistServeSinglerenderWithSplices withSplices heistLocal withSession commitSession setInSessiongetFromSessiondeleteFromSession csrfToken sessionToList resetSession touchSession AuthManagerbackendsession activeUser minPasswdLenrememberCookieNamerememberPeriodsiteKeylockout IAuthBackendsavelookupByUserId lookupByLoginlookupByRememberTokendestroy createUserusernameExistsloginByUsernameloginByRememberTokenlogout currentUser isLoggedInsaveUser destroyUser markAuthFailmarkAuthSuccesscheckPasswordAndLogin forceLoginauthenticatePassword registerUser loginUser logoutUser requireUser withBackendaddAuthSplices ifLoggedIn ifLoggedOutinitJsonFileAuthManager mkJsonAuthMgrinitCookieSessionManagerRSTrunRSTevalRSTexecRSTwithRSTmapRSTrwsBindLensedunlensedgetBaseembedgloballylocally lensedAsState runLensedLensTputBaselGetlPutrunLensT withLensT RoleMetadata_roleMetadataName_roleDescription _roleDataDefsRoleDataDefinition _roleDataName_roleValueMeta_roleDataDescription RoleValueMetaRoleDoubleMeta RoleIntMeta RoleEnumMeta RoleTextMeta RoleBoolMeta _roleName _roleData RoleValue RoleDoubleRoleIntRoleTextRoleBool toSortedListRuleSetRule ruleToSet rulesToSet RuleChecker RoleMonad_unRCmatches addRoleDataRoleMapfromListlookupdeleteinsertemptynull RoleBuilder applyRule applyRuleSet checkUnseen checkSeenmarkSeenisum expandRoleshasRole missingRole hasAllRoles hasAnyRolesrunRuleCheckermkRuleimplies impliesWith testRulestXt1t2t3t4t5t6t7t8t9t10t11t12t13t14t15t16t17 SecureCookiegetSecureCookiesetSecureCookie checkTimeoutbase Data.MaybeNothing$fSerializeUTCTime randomToken mkCSRFTokenISessionManagerloadcommitresettouchcsrftoList_snapletConfig _snapletValue _scAncestry _scFilePath_scId_scDescription _scUserConfig_scRouteContext_scRoutePattern _reloader buildPath getRootURLHookInitializerState _isTopLevel_cleanup _handlers_hFilter _curConfig _initMessagessnap-core-0.7.0.1Snap.Internal.Types MonadSnapdata-lens-template-2.1.3Data.Lens.Template makeLenses scAncestry scFilePathscId scDescription scUserConfigscRouteContextscRoutePatternreloader$fMonadStatevHandler ReloadInforiRefriAction isTopLevelcleanuphandlershFilter curConfig initMessagesiGet mtl-2.0.1.0Control.Monad.State.ClassgetiModifymodifyiGetsgets toSnapletHookaddPostInitHook'upHookupHook' modifyCfgsetupFilesystem mkSnaplet bracketInitsetupSnapletCallchroot chrootHandler mungeFilter logInitMsg mkReloaderrunBaserunInitializer_heistTS _heistCTSchangeTSrunSnapletSplicewithSS heist-0.7.0.1Text.Templating.HeistemptyTemplateStateheistInitWorkermodifyHeistTS' withHeistTS' addSplices' renderHelper heistLocal' withSplices'renderWithSplices'$fMonadSnapletSnapletHeist$fMonadSnapTemplateMonadText.Templating.Heist.Types TemplateState loadSession buildAuthUsergetRememberTokensetRememberTokenforgetRememberTokensetSessionUserIdremoveSessionUserIdgetSessionUserId cacheOrLookupJsonFileAuthManagermemcachedbfile UserCacheuidCache loginCache tokenCache uidCounterRemTokenUserCacheLoginUserCache UserIdCache defUserCache loadUserCache withCachegetUsershowTPayloadCookieSessionManager CookieSession cookieNametimeOut csCSRFToken csSessionSessionunordered-containers-0.1.4.6Data.HashMap.CommonHashMapmkCookieSessionloadDefSession modSession getPayload setPayloadGHC.Basefail>>=>>fmapreturnControl.Monad.Fixmfix Control.MonadguardliftMMonadFunctorMonadFix MonadPlusControl.Applicative Applicative<*> Data.Functor<$> AlternativemplusmzerooptionalliftA3liftA2liftA<**><**>puremanysome<|>getConstConst unwrapMonad WrapMonad WrappedMonad unwrapArrow WrapArrow WrappedArrow getZipListZipList Data.FunctionfixmfilterapliftM5liftM4liftM3liftM2unlesswhen replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMjoinvoidforever<=<>=>msumforM_forMfilterMmapM_mapM sequence_sequence=<<<$data-lens-2.0.2Data.Lens.Common intSetLenssetLens intMapLensmapLenssndLensfstLens^!/=^/=^!*=^!-=^!+=^*=^-=^+=^%%=^!%=^%=modL^!=^=setL^!^.^$!^$getLisolensrunLensLens nameMakeLensmakeLenstransformers-0.2.2.0Control.Monad.Trans.State.Lazy evalStateT runStateTenumerator-0.4.18Data.Enumerator.Internal EnumeratorputControl.Monad.IO.ClassliftIOMonadIOControl.Monad.Trans.Classlift MonadTrans MonadStateStateTStatestaterunState evalState execStatemapState withState execStateT mapStateT withStateTSnap.Internal.Routing routeLocalroutegetTimeoutAction setTimeout expireCookie readCookie getCookie getParamsgetParamrunSnap escapeHttpterminateConnection bracketSnapipHeaderFilter'ipHeaderFilter withResponse withRequest localRequestsendFilePartialsendFile writeLazyText writeTextwriteLBSwriteBS writeBuilder addToOutputlogError redirect'redirectmodifyResponse modifyRequest putRequest putResponse getsResponse getResponse getsRequest getRequestifToppathArgpathdirmethodsmethodpasscatchFinishWith finishWithtransformRequestBodyreadRequestBodygetRequestBodyrunRequestBodyliftSnapNoHandlerExceptionEscapeHttpExceptionSnap.Internal.ParsingprintUrlEncodedbuildUrlEncodedparseUrlEncodedurlEncodeBuilder urlEncode urlDecodeSnap.Internal.Http.Types parseHttpTimeformatHttpTimeclearContentLengthsetContentLengthmodifyResponseCookiedeleteResponseCookiegetResponseCookiesgetResponseCookieaddResponseCookiesetContentTypemodifyResponseBodysetResponseCodesetResponseStatussetResponseBody emptyResponse rqSetParamrqModifyParamsrqParam deleteHeader listHeaders getHeader getHeaders setHeader addHeaderheaders updateHeaders HasHeadersGETHEADPOSTPUTDELETETRACEOPTIONSCONNECTMethod HttpVersioncookieHttpOnly cookieSecure cookiePath cookieDomain cookieExpires cookieValueCookieParamsSomeEnumeratorrqParams rqQueryStringrqURI rqContextPath rqPathInfo rqCookies rqVersionrqMethodrqContentLength rqIsSecurerqLocalHostname rqLocalAddr rqRemotePort rqRemoteAddr rqServerPort rqServerNameRequestrspStatusReason rspStatusResponseSnap.Types.HeadersHeaderssnap-server-0.7.0.1Snap.Http.ServersetUnicodeLocalequickHttpServe httpServesimpleHttpServesnapServerVersionSnap.Http.Server.ConfigcommandLineConfigcompleteConfig setBackendsetOthersetDefaultTimeoutsetErrorHandler setVerbosesetCompression setSSLKey setSSLCert setSSLBind setSSLPortsetBindsetPort setLocale setErrorLog setAccessLog setHostname getBackendgetOthergetDefaultTimeoutgetErrorHandler getVerbosegetCompression getSSLKey getSSLCert getSSLBind getSSLPortgetBindgetPort getLocale getErrorLog getAccessLog getHostname defaultConfig emptyConfigConfigSimpleBackendConfigLibEvBackend ConfigBackend ConfigNoLog ConfigFileLog ConfigIoLog ConfigLogConfig