aboutsummaryrefslogtreecommitdiff
path: root/src/Sproxy/Application/Cookie.hs
diff options
context:
space:
mode:
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}