chore(auth): fix redundant imports
This commit is contained in:
parent
96038a4f22
commit
bcfcbd5c9b
@ -40,19 +40,8 @@ import qualified Data.Set as Set
|
|||||||
import qualified Data.Text as Text
|
import qualified Data.Text as Text
|
||||||
import qualified Data.Text.Encoding as Text
|
import qualified Data.Text.Encoding as Text
|
||||||
|
|
||||||
import Foundation.Authorization (AuthorizationCacheKey(..))
|
|
||||||
import Foundation.I18n
|
|
||||||
import Foundation.Type
|
|
||||||
import Foundation.Types
|
|
||||||
|
|
||||||
import Handler.Utils.LdapSystemFunctions
|
|
||||||
import Handler.Utils.Memcached
|
|
||||||
import Handler.Utils.Profile
|
|
||||||
|
|
||||||
import qualified Ldap.Client as Ldap
|
import qualified Ldap.Client as Ldap
|
||||||
|
|
||||||
import Yesod.Auth.Message
|
|
||||||
|
|
||||||
|
|
||||||
authenticate :: ( MonadHandler m, HandlerSite m ~ UniWorX
|
authenticate :: ( MonadHandler m, HandlerSite m ~ UniWorX
|
||||||
, YesodPersist UniWorX, BackendCompatible SqlBackend (YesodPersistBackend UniWorX)
|
, YesodPersist UniWorX, BackendCompatible SqlBackend (YesodPersistBackend UniWorX)
|
||||||
@ -64,7 +53,7 @@ authenticate creds@Creds{..} = liftHandler . runDB . withReaderT projectBackend
|
|||||||
$logErrorS "Auth" $ "\a\27[31m" <> tshow creds <> "\27[0m" -- TODO: debug only
|
$logErrorS "Auth" $ "\a\27[31m" <> tshow creds <> "\27[0m" -- TODO: debug only
|
||||||
setSessionJson SessionOAuth2Token $ (getAccessToken creds, getRefreshToken creds)
|
setSessionJson SessionOAuth2Token $ (getAccessToken creds, getRefreshToken creds)
|
||||||
sess <- getSession
|
sess <- getSession
|
||||||
$logErrorS "OAuth" $ "\27[34m" <> tshow sess <> "\27[0m"
|
$logErrorS "OAuth" $ "\27[34m" <> tshow sess <> "\27[0m" -- TODO: debug only
|
||||||
|
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
userAuthConf <- getsYesod $ view _appUserAuthConf
|
userAuthConf <- getsYesod $ view _appUserAuthConf
|
||||||
|
|||||||
Reference in New Issue
Block a user