git.iko.soy/typeable/random-token
on master help sign in
B2B-1723 Air should handle access token expiration (#5689)

* B2B-1714: Don't check the old session in air admin (#5669) * Quick fix for auth issue on prod (#5675) * B2B-1723 Handle access token expiration in air * Remove unused code * Move lookupSession to MaybeT * haslex * Remove CI target Co-authored-by: Yuras <shumovichy@gmail.com>

commit13b772ebc27ac97c0036dcff1eb3381133c088a5 authorVille Tirronen <ville@typeable.io> dateMon 25 Jan 2021, 20:21 (6 years ago) parent0272d77
1 file changed+4
src/Random/Token.hs+4
src/Random/Token.hs+4
@@ -5,6 +5,7 @@ module Random.Token
55 , asciiToToken
66 , textToToken
77 , generateToken
8+ , unsafeCoerceToken
89 ) where
910
1011import Control.DeepSeq
@@ -68,3 +69,6 @@ asciiToToken bs = Token <$> B64.decode bs
6869
6970textToToken :: Text -> Either String (Token a)
7071textToToken = asciiToToken . T.encodeUtf8
72+
73+unsafeCoerceToken :: Token a -> Token b
74+unsafeCoerceToken (Token a) = Token a