-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Middleware and utilities for using Atlassian Crowd authentication
--   
--   See README
@package wai-middleware-crowd
@version 0.1.4.2

module Network.Wai.Middleware.Crowd

-- | Settings for creating the Crowd middleware.
--   
--   To create a value, use <a>defaultCrowdSettings</a> and then various
--   setter functions.
--   
--   Since 0.1.0
data CrowdSettings

-- | Default value for <a>CrowdSettings</a>.
--   
--   Since 0.1.0
defaultCrowdSettings :: CrowdSettings

-- | Set the function to get client session key for encrypting cookie data.
--   
--   Default: <a>getDefaultKey</a>
--   
--   Since 0.1.0
setCrowdKey :: IO Key -> CrowdSettings -> CrowdSettings

-- | Set the root of the Crowd service. This is used as an OpenID endpoint.
--   
--   Default: <tt><a>http://localhost:8095/openidserver</a></tt>
--   
--   Since 0.1.0
setCrowdRoot :: Text -> CrowdSettings -> CrowdSettings

-- | The application root for this application.
--   
--   This is used for constructing completion URLs when communicating with
--   Crowd's OpenID implementation.
--   
--   Default: use the APPROOT environment variable.
--   
--   Since 0.1.0
setCrowdApprootStatic :: Text -> CrowdSettings -> CrowdSettings

-- | More generalized version of <a>setCrowdApprootStatic</a>.
--   
--   Since 0.1.0
setCrowdApprootGeneric :: IO (Request -> IO Text) -> CrowdSettings -> CrowdSettings

-- | Acquire an HTTP connection manager.
--   
--   Default: get a new tls-enabled manager.
--   
--   Since 0.1.0
setCrowdManager :: IO Manager -> CrowdSettings -> CrowdSettings

-- | Number of seconds to keep an authentication cookie active
--   
--   Default: 3600
--   
--   Since 0.1.0
setCrowdAge :: Int -> CrowdSettings -> CrowdSettings

-- | Create the Crowd middleware based on the given settings.
--   
--   Since 0.1.0
mkCrowdMiddleware :: CrowdSettings -> IO Middleware

-- | Determine approot by:
--   
--   <ul>
--   <li>First respecting the APPROOT environment variable if present</li>
--   <li>If not, respect the Host header and isSecure property, together
--   with the following de facto standards: x-forwarded-protocol,
--   x-forwarded-ssl, x-url-scheme, x-forwarded-proto, front-end-https.
--   (Note: this list may be updated at will in the future without doc
--   updates.)</li>
--   </ul>
--   
--   Normally trusting headers in this way is insecure, however in the case
--   of approot, the worst that can happen is that the client will get an
--   incorrect URL. Note that this does not work for some situations, e.g.:
--   
--   <ul>
--   <li>Reverse proxies not setting one of the above mentioned
--   headers</li>
--   <li>Applications hosted somewhere besides the root of the domain
--   name</li>
--   <li>Reverse proxies that modify the host header</li>
--   </ul>
--   
--   Since 0.1.0
smartApproot :: IO (Request -> IO Text)

-- | Current version
--   
--   Since 0.1.0
waiMiddlewareCrowdVersion :: Version

-- | Get the username for the current user.
--   
--   If called on a <tt>Request</tt> behind the middleware, should always
--   return a <tt>Just</tt> value.
--   
--   Since 0.1.1.0
getUserName :: Request -> Maybe ByteString
instance GHC.Show.Show Network.Wai.Middleware.Crowd.CrowdState
instance GHC.Generics.Generic Network.Wai.Middleware.Crowd.CrowdState
instance Data.Binary.Class.Binary Network.Wai.Middleware.Crowd.CrowdState
