Skip to content

Commit

Permalink
Upgrade base64 to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
freizl committed Jan 13, 2024
1 parent 9a63224 commit e4c9b56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
packages: */*.cabal
index-state: 2023-12-20T01:31:26Z
index-state: 2024-01-13T01:06:06Z

-- TODO: doesn't seem work unless add to ~/.cabal/config
extra-include-dirs: /opt/homebrew/opt/openssl@3/include
Expand Down
2 changes: 1 addition & 1 deletion hoauth2/hoauth2.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ library
build-depends:
, aeson >=2.0 && <2.3
, base >=4.11 && <5
, base64 ^>=0.4
, base64 >=1.0 && <1.1
, binary >=0.8 && <0.11
, bytestring >=0.9 && <0.13
, containers >=0.6 && <0.8
Expand Down
3 changes: 2 additions & 1 deletion hoauth2/src/Network/OAuth2/Experiment/Pkce.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module Network.OAuth2.Experiment.Pkce (
import Control.Monad.IO.Class
import Crypto.Hash qualified as H
import Crypto.Random qualified as Crypto
import Data.Base64.Types qualified as B64
import Data.ByteArray qualified as ByteArray
import Data.ByteString qualified as BS
import Data.ByteString.Base64.URL qualified as B64
Expand Down Expand Up @@ -42,7 +43,7 @@ mkPkceParam = do
}

encodeCodeVerifier :: BS.ByteString -> Text
encodeCodeVerifier = B64.encodeBase64Unpadded . BS.pack . ByteArray.unpack . hashSHA256
encodeCodeVerifier = B64.extractBase64 . B64.encodeBase64Unpadded . BS.pack . ByteArray.unpack . hashSHA256

genCodeVerifier :: MonadIO m => m BS.ByteString
genCodeVerifier = liftIO $ getBytesInternal BS.empty
Expand Down

0 comments on commit e4c9b56

Please sign in to comment.