aboutsummaryrefslogtreecommitdiff
path: root/src/Sproxy/Application/Cookie.hs
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-09-06 18:34:28 +0200
committerIgor Pashev <pashev.igor@gmail.com>2019-09-06 18:34:43 +0200
commit6df3894131699a3a81e5e4da1565268eb01639c6 (patch)
treef1bb612c6e71f5f75f2bc0ad123127d7edb54a09 /src/Sproxy/Application/Cookie.hs
parent5af03230208f355c53c3b8f763d9533f9e859411 (diff)
downloadsproxy2-6df3894131699a3a81e5e4da1565268eb01639c6.tar.gz
Reformat with modern hindent 5.2.7
Diffstat (limited to 'src/Sproxy/Application/Cookie.hs')
-rw-r--r--src/Sproxy/Application/Cookie.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Sproxy/Application/Cookie.hs b/src/Sproxy/Application/Cookie.hs
index a9a8ad6..d027e19 100644
--- a/src/Sproxy/Application/Cookie.hs
+++ b/src/Sproxy/Application/Cookie.hs
@@ -42,9 +42,9 @@ instance DS.Serialize AuthCookie where
(e, n, f, x) <- DS.get
return
AuthCookie
- { acUser = AuthUser {auEmail = e, auGivenName = n, auFamilyName = f}
- , acExpiry = CTime x
- }
+ { acUser = AuthUser {auEmail = e, auGivenName = n, auFamilyName = f}
+ , acExpiry = CTime x
+ }
cookieDecode :: ByteString -> ByteString -> Either String AuthCookie
cookieDecode key d = State.decode key d >>= DS.decode
@@ -67,10 +67,10 @@ getFamilyNameUtf8 = auFamilyName
newUser :: Text -> AuthUser
newUser email =
AuthUser
- { auEmail = encodeUtf8 . toLower . strip $ email
- , auGivenName = ""
- , auFamilyName = ""
- }
+ { auEmail = encodeUtf8 . toLower . strip $ email
+ , auGivenName = ""
+ , auFamilyName = ""
+ }
setGivenName :: Text -> AuthUser -> AuthUser
setGivenName given au = au {auGivenName = encodeUtf8 . strip $ given}