From 0d589e12a0c32936303de46b1e462dd19648170d Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 19 Jul 2015 16:07:15 +0200 Subject: Login with a token validation --- src/server/Model/UUID.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/server/Model/UUID.hs (limited to 'src/server/Model/UUID.hs') diff --git a/src/server/Model/UUID.hs b/src/server/Model/UUID.hs new file mode 100644 index 0000000..6cb7ce0 --- /dev/null +++ b/src/server/Model/UUID.hs @@ -0,0 +1,10 @@ +module Model.UUID + ( generateUUID + ) where + +import Data.UUID (toString) +import Data.UUID.V4 (nextRandom) +import Data.Text (Text, pack) + +generateUUID :: IO Text +generateUUID = pack . toString <$> nextRandom -- cgit v1.2.3