aboutsummaryrefslogtreecommitdiff
path: root/src/Model/AuthenticationHolder.hs
diff options
context:
space:
mode:
authoradambrangenberg <adabran06@gmail.com>2025-12-24 09:24:44 +0100
committeradambrangenberg <adabran06@gmail.com>2025-12-24 09:24:44 +0100
commitf90d752a47d677035d147b650636f8103132ba6f (patch)
tree5d6ae46de0cec142d77c567f6ee2e0e567356ad3 /src/Model/AuthenticationHolder.hs
parent4da55d6434f6077f35466c9c0dfe3c29ee33f984 (diff)
Add actual access tokens through JWT
Diffstat (limited to 'src/Model/AuthenticationHolder.hs')
-rw-r--r--src/Model/AuthenticationHolder.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Model/AuthenticationHolder.hs b/src/Model/AuthenticationHolder.hs
new file mode 100644
index 0000000..d3b53de
--- /dev/null
+++ b/src/Model/AuthenticationHolder.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE OverloadedStrings #-}
+
+module Model.AuthenticationHolder (AuthenticationHolder (..), server_password) where
+
+import Data.Aeson
+import GHC.Generics
+import Data.Text (Text)
+import Data.ByteString
+
+----------------------------------------------------------------------------------------------------
+data AuthenticationHolder = AuthenticationHolder
+ { username :: Text
+ , device :: Text
+ , expire :: Maybe Int
+ }
+ deriving (Show, Eq, Generic)
+
+instance FromJSON AuthenticationHolder
+instance ToJSON AuthenticationHolder
+
+server_password :: ByteString
+server_password = "jamaa_dev" \ No newline at end of file