/usr/share/doc/libghc-yesod-auth-doc/html/Yesod-Auth.html is in libghc-yesod-auth-doc 1.3.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Yesod.Auth</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Yesod-Auth.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Yesod-Auth.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">yesod-auth-1.3.4: Authentication for Yesod.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Yesod.Auth</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Subsite
</a></li><li><a href="#g:2">Plugin interface
</a></li><li><a href="#g:3">User functions
</a></li><li><a href="#g:4">Exception
</a></li><li><a href="#g:5">Helper
</a></li><li><a href="#g:6">Internal
</a></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Auth">Auth</a> </li><li class="src short"><span class="keyword">type</span> <a href="#t:AuthRoute">AuthRoute</a> = <a href="Yesod-Auth.html#t:Route">Route</a> <a href="Yesod-Auth.html#t:Auth">Auth</a></li><li class="src short"><span class="keyword">data family</span> <a href="#t:Route">Route</a> a1 </li><li class="src short"><span class="keyword">data</span> <a href="#t:AuthPlugin">AuthPlugin</a> master = <a href="#v:AuthPlugin">AuthPlugin</a> {<ul class="subs"><li><a href="#v:apName">apName</a> :: <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></li><li><a href="#v:apDispatch">apDispatch</a> :: Method -> [Piece] -> <a href="Yesod-Auth.html#t:AuthHandler">AuthHandler</a> master TypedContent</li><li><a href="#v:apLogin">apLogin</a> :: (<a href="Yesod-Auth.html#t:Route">Route</a> <a href="Yesod-Auth.html#t:Auth">Auth</a> -> <a href="Yesod-Auth.html#t:Route">Route</a> master) -> WidgetT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li></ul>}</li><li class="src short"><a href="#v:getAuth">getAuth</a> :: a -> <a href="Yesod-Auth.html#t:Auth">Auth</a></li><li class="src short"><span class="keyword">class</span> (Yesod master, PathPiece (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master), RenderMessage master <a href="/usr/share/doc/libghc-yesod-form-doc/html/Yesod-Form-Types.html#t:FormMessage">FormMessage</a>) => <a href="#t:YesodAuth">YesodAuth</a> master <span class="keyword">where</span><ul class="subs"><li><span class="keyword">type</span> <a href="#t:AuthId">AuthId</a> master </li><li><a href="#v:authLayout">authLayout</a> :: WidgetT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> () -> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a></li><li><a href="#v:loginDest">loginDest</a> :: master -> <a href="Yesod-Auth.html#t:Route">Route</a> master</li><li><a href="#v:logoutDest">logoutDest</a> :: master -> <a href="Yesod-Auth.html#t:Route">Route</a> master</li><li><a href="#v:getAuthId">getAuthId</a> :: <a href="Yesod-Auth.html#t:Creds">Creds</a> master -> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master))</li><li><a href="#v:authPlugins">authPlugins</a> :: master -> [<a href="Yesod-Auth.html#t:AuthPlugin">AuthPlugin</a> master]</li><li><a href="#v:loginHandler">loginHandler</a> :: <a href="Yesod-Auth.html#t:AuthHandler">AuthHandler</a> master <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a></li><li><a href="#v:renderAuthMessage">renderAuthMessage</a> :: master -> [<a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a>] -> <a href="Yesod-Auth-Message.html#t:AuthMessage">AuthMessage</a> -> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></li><li><a href="#v:redirectToReferer">redirectToReferer</a> :: master -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:authHttpManager">authHttpManager</a> :: master -> <a href="/usr/share/doc/libghc-http-client-doc/html/Network-HTTP-Client.html#t:Manager">Manager</a></li><li><a href="#v:onLogin">onLogin</a> :: HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li><a href="#v:onLogout">onLogout</a> :: HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li><a href="#v:maybeAuthId">maybeAuthId</a> :: HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master))</li><li><a href="#v:onErrorHtml">onErrorHtml</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResourceBase">MonadResourceBase</a> m => <a href="Yesod-Auth.html#t:Route">Route</a> master -> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -> HandlerT master m <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a></li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:YesodAuthPersist">YesodAuthPersist</a> master = (<a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistMonadBackend">PersistMonadBackend</a> (<a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersistBackend">YesodPersistBackend</a> master (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)) ~ <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master), <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Key">Key</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master) ~ <a href="Yesod-Auth.html#t:AuthId">AuthId</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistStore">PersistStore</a> (<a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersistBackend">YesodPersistBackend</a> master (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)), <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master), <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersist">YesodPersist</a> master, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master))</li><li class="src short"><span class="keyword">type</span> <a href="#t:AuthEntity">AuthEntity</a> master = <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:KeyEntity">KeyEntity</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master)</li><li class="src short"><span class="keyword">data</span> <a href="#t:Creds">Creds</a> master = <a href="#v:Creds">Creds</a> {<ul class="subs"><li><a href="#v:credsPlugin">credsPlugin</a> :: <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></li><li><a href="#v:credsIdent">credsIdent</a> :: <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></li><li><a href="#v:credsExtra">credsExtra</a> :: [(<a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a>, <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a>)]</li></ul>}</li><li class="src short"><a href="#v:setCreds">setCreds</a> :: <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Yesod-Auth.html#t:Creds">Creds</a> master -> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setCredsRedirect">setCredsRedirect</a> :: <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master => <a href="Yesod-Auth.html#t:Creds">Creds</a> master -> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> TypedContent</li><li class="src short"><a href="#v:clearCreds">clearCreds</a> :: <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:loginErrorMessage">loginErrorMessage</a> :: (<a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master, <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResourceBase">MonadResourceBase</a> m) => <a href="Yesod-Auth.html#t:Route">Route</a> master -> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -> HandlerT master m TypedContent</li><li class="src short"><a href="#v:loginErrorMessageI">loginErrorMessageI</a> :: (<a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResourceBase">MonadResourceBase</a> m, <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master) => <a href="Yesod-Auth.html#t:Route">Route</a> child -> <a href="Yesod-Auth-Message.html#t:AuthMessage">AuthMessage</a> -> HandlerT child (HandlerT master m) TypedContent</li><li class="src short"><a href="#v:defaultMaybeAuthId">defaultMaybeAuthId</a> :: (<a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistMonadBackend">PersistMonadBackend</a> (b (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)) ~ <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> val, b ~ <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersistBackend">YesodPersistBackend</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Key">Key</a> val ~ <a href="Yesod-Auth.html#t:AuthId">AuthId</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistStore">PersistStore</a> (b (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)), <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> val, <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersist">YesodPersist</a> master, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> val) => HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master))</li><li class="src short"><a href="#v:maybeAuth">maybeAuth</a> :: (<a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistMonadBackend">PersistMonadBackend</a> (b (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)) ~ <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> val, b ~ <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersistBackend">YesodPersistBackend</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Key">Key</a> val ~ <a href="Yesod-Auth.html#t:AuthId">AuthId</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistStore">PersistStore</a> (b (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)), <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> val, <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersist">YesodPersist</a> master, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> val) => HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Entity">Entity</a> val))</li><li class="src short"><a href="#v:requireAuthId">requireAuthId</a> :: <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master => HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master)</li><li class="src short"><a href="#v:requireAuth">requireAuth</a> :: <a href="Yesod-Auth.html#t:YesodAuthPersist">YesodAuthPersist</a> master => HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Entity">Entity</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master))</li><li class="src short"><span class="keyword">data</span> <a href="#t:AuthException">AuthException</a> = <a href="#v:InvalidFacebookResponse">InvalidFacebookResponse</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:AuthHandler">AuthHandler</a> master a = <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master => HandlerT <a href="Yesod-Auth.html#t:Auth">Auth</a> (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>) a</li><li class="src short"><a href="#v:credsKey">credsKey</a> :: <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></li><li class="src short"><a href="#v:provideJsonMessage">provideJsonMessage</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Writer-Lazy.html#t:Writer">Writer</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Endo">Endo</a> [ProvidedRep m]) ()</li><li class="src short"><a href="#v:messageJson401">messageJson401</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResourceBase">MonadResourceBase</a> m => <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -> HandlerT master m <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a> -> HandlerT master m TypedContent</li><li class="src short"><a href="#v:asHtml">asHtml</a> :: <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a> -> <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a></li></ul></div><div id="interface"><h1 id="g:1">Subsite
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Auth" class="def">Auth</a> <a href="src/Yesod-Auth-Routes.html#Auth" class="link">Source</a></p><div class="subs instances"><p id="control.i:Auth" class="caption collapser" onclick="toggleSection('i:Auth')">Instances</p><div id="section.i:Auth" class="show"><table><tr><td class="src">RouteAttrs <a href="Yesod-Auth.html#t:Auth">Auth</a></td><td class="doc empty"> </td></tr><tr><td class="src">RenderRoute <a href="Yesod-Auth.html#t:Auth">Auth</a></td><td class="doc empty"> </td></tr><tr><td class="src">ParseRoute <a href="Yesod-Auth.html#t:Auth">Auth</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master => YesodSubDispatch <a href="Yesod-Auth.html#t:Auth">Auth</a> (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> (<a href="Yesod-Auth.html#t:Route">Route</a> <a href="Yesod-Auth.html#t:Auth">Auth</a>)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> (<a href="Yesod-Auth.html#t:Route">Route</a> <a href="Yesod-Auth.html#t:Auth">Auth</a>)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> (<a href="Yesod-Auth.html#t:Route">Route</a> <a href="Yesod-Auth.html#t:Auth">Auth</a>)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:AuthRoute" class="def">AuthRoute</a> = <a href="Yesod-Auth.html#t:Route">Route</a> <a href="Yesod-Auth.html#t:Auth">Auth</a><a href="src/Yesod-Auth.html#AuthRoute" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data family</span> <a name="t:Route" class="def">Route</a> a1 </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:AuthPlugin" class="def">AuthPlugin</a> master <a href="src/Yesod-Auth.html#AuthPlugin" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:AuthPlugin" class="def">AuthPlugin</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:apName" class="def">apName</a> :: <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:apDispatch" class="def">apDispatch</a> :: Method -> [Piece] -> <a href="Yesod-Auth.html#t:AuthHandler">AuthHandler</a> master TypedContent</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:apLogin" class="def">apLogin</a> :: (<a href="Yesod-Auth.html#t:Route">Route</a> <a href="Yesod-Auth.html#t:Auth">Auth</a> -> <a href="Yesod-Auth.html#t:Route">Route</a> master) -> WidgetT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:getAuth" class="def">getAuth</a> :: a -> <a href="Yesod-Auth.html#t:Auth">Auth</a><a href="src/Yesod-Auth.html#getAuth" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">class</span> (Yesod master, PathPiece (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master), RenderMessage master <a href="/usr/share/doc/libghc-yesod-form-doc/html/Yesod-Form-Types.html#t:FormMessage">FormMessage</a>) => <a name="t:YesodAuth" class="def">YesodAuth</a> master <span class="keyword">where</span><a href="src/Yesod-Auth.html#YesodAuth" class="link">Source</a></p><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a name="t:AuthId" class="def">AuthId</a> master <a href="src/Yesod-Auth.html#AuthId" class="link">Source</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:authLayout" class="def">authLayout</a> :: WidgetT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> () -> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a><a href="src/Yesod-Auth.html#authLayout" class="link">Source</a></p><div class="doc"><p>specify the layout. Uses defaultLayout by default
</p></div><p class="src"><a name="v:loginDest" class="def">loginDest</a> :: master -> <a href="Yesod-Auth.html#t:Route">Route</a> master<a href="src/Yesod-Auth.html#loginDest" class="link">Source</a></p><div class="doc"><p>Default destination on successful login, if no other
destination exists.
</p></div><p class="src"><a name="v:logoutDest" class="def">logoutDest</a> :: master -> <a href="Yesod-Auth.html#t:Route">Route</a> master<a href="src/Yesod-Auth.html#logoutDest" class="link">Source</a></p><div class="doc"><p>Default destination on successful logout, if no other
destination exists.
</p></div><p class="src"><a name="v:getAuthId" class="def">getAuthId</a> :: <a href="Yesod-Auth.html#t:Creds">Creds</a> master -> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master))<a href="src/Yesod-Auth.html#getAuthId" class="link">Source</a></p><div class="doc"><p>Determine the ID associated with the set of credentials.
</p></div><p class="src"><a name="v:authPlugins" class="def">authPlugins</a> :: master -> [<a href="Yesod-Auth.html#t:AuthPlugin">AuthPlugin</a> master]<a href="src/Yesod-Auth.html#authPlugins" class="link">Source</a></p><div class="doc"><p>Which authentication backends to use.
</p></div><p class="src"><a name="v:loginHandler" class="def">loginHandler</a> :: <a href="Yesod-Auth.html#t:AuthHandler">AuthHandler</a> master <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a><a href="src/Yesod-Auth.html#loginHandler" class="link">Source</a></p><div class="doc"><p>What to show on the login page.
</p></div><p class="src"><a name="v:renderAuthMessage" class="def">renderAuthMessage</a><a href="src/Yesod-Auth.html#renderAuthMessage" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: master</td><td class="doc empty"> </td></tr><tr><td class="src">-> [<a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a>]</td><td class="doc"><p>languages
</p></td></tr><tr><td class="src">-> <a href="Yesod-Auth-Message.html#t:AuthMessage">AuthMessage</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Used for i18n of messages provided by this package.
</p></div><p class="src"><a name="v:redirectToReferer" class="def">redirectToReferer</a> :: master -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Yesod-Auth.html#redirectToReferer" class="link">Source</a></p><div class="doc"><p>After login and logout, redirect to the referring page, instead of
<code><a href="Yesod-Auth.html#v:loginDest">loginDest</a></code> and <code><a href="Yesod-Auth.html#v:logoutDest">logoutDest</a></code>. Default is <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#v:False">False</a></code>.
</p></div><p class="src"><a name="v:authHttpManager" class="def">authHttpManager</a> :: master -> <a href="/usr/share/doc/libghc-http-client-doc/html/Network-HTTP-Client.html#t:Manager">Manager</a><a href="src/Yesod-Auth.html#authHttpManager" class="link">Source</a></p><div class="doc"><p>Return an HTTP connection manager that is stored in the foundation
type. This allows backends to reuse persistent connections. If none of
the backends you're using use HTTP connections, you can safely return
<code>error "authHttpManager"</code> here.
</p></div><p class="src"><a name="v:onLogin" class="def">onLogin</a> :: HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()<a href="src/Yesod-Auth.html#onLogin" class="link">Source</a></p><div class="doc"><p>Called on a successful login. By default, calls
<code>setMessageI NowLoggedIn</code>.
</p></div><p class="src"><a name="v:onLogout" class="def">onLogout</a> :: HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()<a href="src/Yesod-Auth.html#onLogout" class="link">Source</a></p><div class="doc"><p>Called on logout. By default, does nothing
</p></div><p class="src"><a name="v:maybeAuthId" class="def">maybeAuthId</a> :: HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master))<a href="src/Yesod-Auth.html#maybeAuthId" class="link">Source</a></p><div class="doc"><p>Retrieves user credentials, if user is authenticated.
</p><p>By default, this calls <code><a href="Yesod-Auth.html#v:defaultMaybeAuthId">defaultMaybeAuthId</a></code> to get the user ID from the
session. This can be overridden to allow authentication via other means,
such as checking for a special token in a request header. This is
especially useful for creating an API to be accessed via some means
other than a browser.
</p><p>Since 1.2.0
</p></div><p class="src"><a name="v:onErrorHtml" class="def">onErrorHtml</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResourceBase">MonadResourceBase</a> m => <a href="Yesod-Auth.html#t:Route">Route</a> master -> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -> HandlerT master m <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a><a href="src/Yesod-Auth.html#onErrorHtml" class="link">Source</a></p><div class="doc"><p>Called on login error for HTTP requests. By default, calls
<code>setMessage</code> and redirects to <code>dest</code>.
</p></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:YesodAuthPersist" class="def">YesodAuthPersist</a> master = (<a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistMonadBackend">PersistMonadBackend</a> (<a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersistBackend">YesodPersistBackend</a> master (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)) ~ <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master), <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Key">Key</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master) ~ <a href="Yesod-Auth.html#t:AuthId">AuthId</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistStore">PersistStore</a> (<a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersistBackend">YesodPersistBackend</a> master (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)), <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master), <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersist">YesodPersist</a> master, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master))<a href="src/Yesod-Auth.html#YesodAuthPersist" class="link">Source</a></p><div class="doc"><p>Constraint which states that the given site is an instance of <code>YesodAuth</code>
and that its <code>AuthId</code> is in fact a persistent <code>Key</code> for the given value.
This is the common case in Yesod, and means that you can easily look up the
full informatin on a given user.
</p><p>Since 1.2.0
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:AuthEntity" class="def">AuthEntity</a> master = <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:KeyEntity">KeyEntity</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master)<a href="src/Yesod-Auth.html#AuthEntity" class="link">Source</a></p><div class="doc"><p>If the <code>AuthId</code> for a given site is a persistent ID, this will give the
value for that entity. E.g.:
</p><pre> type AuthId MySite = UserId
AuthEntity MySite ~ User
</pre><p>Since 1.2.0
</p></div></div><h1 id="g:2">Plugin interface
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Creds" class="def">Creds</a> master <a href="src/Yesod-Auth.html#Creds" class="link">Source</a></p><div class="doc"><p>User credentials
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Creds" class="def">Creds</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:credsPlugin" class="def">credsPlugin</a> :: <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></dt><dd class="doc"><p>How the user was authenticated
</p></dd><dt class="src"><a name="v:credsIdent" class="def">credsIdent</a> :: <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></dt><dd class="doc"><p>Identifier. Exact meaning depends on plugin.
</p></dd><dt class="src"><a name="v:credsExtra" class="def">credsExtra</a> :: [(<a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a>, <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a>)]</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:setCreds" class="def">setCreds</a><a href="src/Yesod-Auth.html#setCreds" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>if HTTP redirects should be done
</p></td></tr><tr><td class="src">-> <a href="Yesod-Auth.html#t:Creds">Creds</a> master</td><td class="doc"><p>new credentials
</p></td></tr><tr><td class="src">-> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Sets user credentials for the session after checking them with authentication backends.
</p></div></div><div class="top"><p class="src"><a name="v:setCredsRedirect" class="def">setCredsRedirect</a><a href="src/Yesod-Auth.html#setCredsRedirect" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Yesod-Auth.html#t:Creds">Creds</a> master</td><td class="doc"><p>new credentials
</p></td></tr><tr><td class="src">-> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> TypedContent</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:clearCreds" class="def">clearCreds</a><a href="src/Yesod-Auth.html#clearCreds" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>if HTTP redirect to <code><a href="Yesod-Auth.html#v:logoutDest">logoutDest</a></code> should be done
</p></td></tr><tr><td class="src">-> HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Clears current user credentials for the session.
</p><p>Since 1.1.7
</p></div></div><div class="top"><p class="src"><a name="v:loginErrorMessage" class="def">loginErrorMessage</a> :: (<a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master, <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResourceBase">MonadResourceBase</a> m) => <a href="Yesod-Auth.html#t:Route">Route</a> master -> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -> HandlerT master m TypedContent<a href="src/Yesod-Auth.html#loginErrorMessage" class="link">Source</a></p><div class="doc"><p>For HTML, set the message and redirect to the route.
For JSON, send the message and a 401 status
</p></div></div><div class="top"><p class="src"><a name="v:loginErrorMessageI" class="def">loginErrorMessageI</a> :: (<a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResourceBase">MonadResourceBase</a> m, <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master) => <a href="Yesod-Auth.html#t:Route">Route</a> child -> <a href="Yesod-Auth-Message.html#t:AuthMessage">AuthMessage</a> -> HandlerT child (HandlerT master m) TypedContent<a href="src/Yesod-Auth.html#loginErrorMessageI" class="link">Source</a></p></div><h1 id="g:3">User functions
</h1><div class="top"><p class="src"><a name="v:defaultMaybeAuthId" class="def">defaultMaybeAuthId</a> :: (<a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistMonadBackend">PersistMonadBackend</a> (b (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)) ~ <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> val, b ~ <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersistBackend">YesodPersistBackend</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Key">Key</a> val ~ <a href="Yesod-Auth.html#t:AuthId">AuthId</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistStore">PersistStore</a> (b (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)), <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> val, <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersist">YesodPersist</a> master, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> val) => HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master))<a href="src/Yesod-Auth.html#defaultMaybeAuthId" class="link">Source</a></p><div class="doc"><p>Retrieves user credentials from the session, if user is authenticated.
</p><p>This function does <em>not</em> confirm that the credentials are valid, see
<code>maybeAuthIdRaw</code> for more information.
</p><p>Since 1.1.2
</p></div></div><div class="top"><p class="src"><a name="v:maybeAuth" class="def">maybeAuth</a> :: (<a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistMonadBackend">PersistMonadBackend</a> (b (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)) ~ <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> val, b ~ <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersistBackend">YesodPersistBackend</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Key">Key</a> val ~ <a href="Yesod-Auth.html#t:AuthId">AuthId</a> master, <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistStore">PersistStore</a> (b (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>)), <a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> val, <a href="/usr/share/doc/libghc-yesod-persistent-doc/html/Yesod-Persist-Core.html#t:YesodPersist">YesodPersist</a> master, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> val) => HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Entity">Entity</a> val))<a href="src/Yesod-Auth.html#maybeAuth" class="link">Source</a></p><div class="doc"><p>Similar to <code><a href="Yesod-Auth.html#v:maybeAuthId">maybeAuthId</a></code>, but additionally look up the value associated
with the user's database identifier to get the value in the database. This
assumes that you are using a Persistent database.
</p><p>Since 1.1.0
</p></div></div><div class="top"><p class="src"><a name="v:requireAuthId" class="def">requireAuthId</a> :: <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master => HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="Yesod-Auth.html#t:AuthId">AuthId</a> master)<a href="src/Yesod-Auth.html#requireAuthId" class="link">Source</a></p><div class="doc"><p>Similar to <code><a href="Yesod-Auth.html#v:maybeAuthId">maybeAuthId</a></code>, but redirects to a login page if user is not
authenticated.
</p><p>Since 1.1.0
</p></div></div><div class="top"><p class="src"><a name="v:requireAuth" class="def">requireAuth</a> :: <a href="Yesod-Auth.html#t:YesodAuthPersist">YesodAuthPersist</a> master => HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="/usr/share/doc/libghc-persistent-doc/html/Database-Persist-Types.html#t:Entity">Entity</a> (<a href="Yesod-Auth.html#t:AuthEntity">AuthEntity</a> master))<a href="src/Yesod-Auth.html#requireAuth" class="link">Source</a></p><div class="doc"><p>Similar to <code><a href="Yesod-Auth.html#v:maybeAuth">maybeAuth</a></code>, but redirects to a login page if user is not
authenticated.
</p><p>Since 1.1.0
</p></div></div><h1 id="g:4">Exception
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:AuthException" class="def">AuthException</a> <a href="src/Yesod-Auth.html#AuthException" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:InvalidFacebookResponse" class="def">InvalidFacebookResponse</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:AuthException" class="caption collapser" onclick="toggleSection('i:AuthException')">Instances</p><div id="section.i:AuthException" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Yesod-Auth.html#t:AuthException">AuthException</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Yesod-Auth.html#t:AuthException">AuthException</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> <a href="Yesod-Auth.html#t:AuthException">AuthException</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:5">Helper
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:AuthHandler" class="def">AuthHandler</a> master a = <a href="Yesod-Auth.html#t:YesodAuth">YesodAuth</a> master => HandlerT <a href="Yesod-Auth.html#t:Auth">Auth</a> (HandlerT master <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a>) a<a href="src/Yesod-Auth.html#AuthHandler" class="link">Source</a></p></div><h1 id="g:6">Internal
</h1><div class="top"><p class="src"><a name="v:credsKey" class="def">credsKey</a> :: <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a><a href="src/Yesod-Auth.html#credsKey" class="link">Source</a></p><div class="doc"><p>Internal session key used to hold the authentication information.
</p><p>Since 1.2.3
</p></div></div><div class="top"><p class="src"><a name="v:provideJsonMessage" class="def">provideJsonMessage</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Writer-Lazy.html#t:Writer">Writer</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Endo">Endo</a> [ProvidedRep m]) ()<a href="src/Yesod-Auth.html#provideJsonMessage" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:messageJson401" class="def">messageJson401</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResourceBase">MonadResourceBase</a> m => <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -> HandlerT master m <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a> -> HandlerT master m TypedContent<a href="src/Yesod-Auth.html#messageJson401" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:asHtml" class="def">asHtml</a> :: <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a> -> <a href="/usr/share/doc/libghc-blaze-html-doc/html/Text-Blaze-Html.html#t:Html">Html</a><a href="src/Yesod-Auth.html#asHtml" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|