git.iko.soy/typeable/random-token
on master help sign in
B2B-1723 Air should handle access token expiration (#5689)
13b772eVille Tirronen
src/Random/Token.hs+4
@@ -5,6 +5,7 @@ module Random.Token
5 , asciiToToken
5 , asciiToToken
6 , textToToken
6 , textToToken
7 , generateToken
7 , generateToken
8+ , unsafeCoerceToken
8 ) where
9 ) where
9
10
10import Control.DeepSeq
11import Control.DeepSeq
@@ -68,3 +69,6 @@ asciiToToken bs = Token <$> B64.decode bs
68
69
69textToToken :: Text -> Either String (Token a)
70textToToken :: Text -> Either String (Token a)
70textToToken = asciiToToken . T.encodeUtf8
71textToToken = asciiToToken . T.encodeUtf8
72+
73+unsafeCoerceToken :: Token a -> Token b
74+unsafeCoerceToken (Token a) = Token a