Fix authBrowserId
This commit is contained in:
parent
1f2e451370
commit
6936331a37
@ -4,6 +4,7 @@
|
|||||||
module Yesod.Auth.BrowserId
|
module Yesod.Auth.BrowserId
|
||||||
( authBrowserId
|
( authBrowserId
|
||||||
, authBrowserId'
|
, authBrowserId'
|
||||||
|
, authBrowserIdAudience
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Yesod.Auth
|
import Yesod.Auth
|
||||||
@ -23,10 +24,10 @@ pid = "browserid"
|
|||||||
complete :: AuthRoute
|
complete :: AuthRoute
|
||||||
complete = PluginR pid []
|
complete = PluginR pid []
|
||||||
|
|
||||||
authBrowserId :: YesodAuth m
|
authBrowserIdAudience :: YesodAuth m
|
||||||
=> Text -- ^ audience
|
=> Text -- ^ audience
|
||||||
-> AuthPlugin m
|
-> AuthPlugin m
|
||||||
authBrowserId audience = AuthPlugin
|
authBrowserIdAudience audience = AuthPlugin
|
||||||
{ apName = pid
|
{ apName = pid
|
||||||
, apDispatch = \m ps ->
|
, apDispatch = \m ps ->
|
||||||
case (m, ps) of
|
case (m, ps) of
|
||||||
@ -50,8 +51,8 @@ authBrowserId audience = AuthPlugin
|
|||||||
|]
|
|]
|
||||||
}
|
}
|
||||||
|
|
||||||
authBrowserId' :: YesodAuth m => AuthPlugin m
|
authBrowserId :: YesodAuth m => AuthPlugin m
|
||||||
authBrowserId' = AuthPlugin
|
authBrowserId = AuthPlugin
|
||||||
{ apName = pid
|
{ apName = pid
|
||||||
, apDispatch = \m ps ->
|
, apDispatch = \m ps ->
|
||||||
case (m, ps) of
|
case (m, ps) of
|
||||||
@ -79,3 +80,7 @@ authBrowserId' = AuthPlugin
|
|||||||
}
|
}
|
||||||
where
|
where
|
||||||
stripScheme t = fromMaybe t $ T.stripPrefix "//" $ snd $ T.breakOn "//" t
|
stripScheme t = fromMaybe t $ T.stripPrefix "//" $ snd $ T.breakOn "//" t
|
||||||
|
|
||||||
|
authBrowserId' :: YesodAuth m => AuthPlugin m
|
||||||
|
authBrowserId' = authBrowserId
|
||||||
|
{-# DEPRECATED authBrowserId' "Use authBrowserId instead" #-}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user