google-oauth2-jwt 0.3.3.1 → 0.3.3.2
raw patch · 4 files changed
+46/−36 lines, 4 files
Files
- LICENSE +1/−1
- README.md +1/−1
- google-oauth2-jwt.cabal +41/−29
- src/Network/Google/OAuth2/JWT.hs +3/−5
LICENSE view
@@ -1,4 +1,4 @@-google-oauth2-jwt - Copyright Michel Boucey (c) 2016-2024+google-oauth2-jwt - Copyright Michel Boucey (c) 2016-2025 All rights reserved.
README.md view
@@ -1,4 +1,4 @@-# Google-oauth2-jwt +# Google-oauth2-jwt  [](https://hackage.haskell.org/package/google-oauth2-jwt) Google-oauth2-jwt implements the creation of the signed JWT for Google Service Accounts, to make authorized calls to Google APIs from server to server. All details here:
google-oauth2-jwt.cabal view
@@ -1,36 +1,48 @@-name: google-oauth2-jwt-version: 0.3.3.1-synopsis: Get a signed JWT for Google Service Accounts-description: This library implements the creation of the- signed JWT for Google Service Accounts.-homepage: https://github.com/MichelBoucey/google-oauth2-jwt-license: BSD3-license-file: LICENSE-author: Michel Boucey-maintainer: michel.boucey@gmail.com-copyright: (c) 2016-2024 - Michel Boucey-category: Google-build-type: Simple-extra-source-files: README.md-cabal-version: >= 1.10+name: google-oauth2-jwt+version: 0.3.3.2+synopsis: Get a signed JWT for Google Service Accounts+description:+ A lightweight library to get the+ signed JWT for Google Service Accounts -Tested-With: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1+homepage: https://github.com/MichelBoucey/google-oauth2-jwt+license: BSD3+license-file: LICENSE+author: Michel Boucey+maintainer: michel.boucey@gmail.com+copyright: (c) 2016-2025 - Michel Boucey+category: Google+build-type: Simple+extra-source-files: README.md+cabal-version: >=1.10+tested-with:+ GHC ==8.8.4+ || ==8.10.7+ || ==9.0.2+ || ==9.2.8+ || ==9.4.8+ || ==9.6.7+ || ==9.8.4+ || ==9.10.2+ || ==9.12.2+ || ==9.14.1 source-repository head type: git- location: git://github.com/MichelBoucey/google-oauth2-jwt.git+ location: https://github.com/MichelBoucey/google-oauth2-jwt.git library- hs-source-dirs: src- exposed-modules: Network.Google.OAuth2.JWT- build-depends: base >= 4.3 && < 5- , base64-bytestring >= 1.0.0 && < 1.3- , bytestring >= 0.10.6 && < 0.13- , HsOpenSSL >= 0.11.7 && < 0.12- , RSA >= 2.4.1 && < 2.5- , text >= 1.2.2 && < 2.2- , unix-time >= 0.3.6 && < 0.5-- default-language: Haskell2010- GHC-options: -Wall+ hs-source-dirs: src+ default-extensions: OverloadedStrings+ exposed-modules: Network.Google.OAuth2.JWT+ build-depends:+ base >=4.3 && <5+ , base64-bytestring >=1.0.0 && <1.3+ , bytestring >=0.10.6 && <0.13+ , HsOpenSSL >=0.11.7 && <0.12+ , RSA >=2.4.1 && <2.5+ , text >=1.2.2 && <2.2+ , unix-time >=0.3.6 && <0.5 + default-language: Haskell2010+ ghc-options: -Wall
src/Network/Google/OAuth2/JWT.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}- -- | Create a signed JWT needed to make the access token request -- to gain access to Google APIs for server to server applications. --@@ -89,7 +87,7 @@ -> [Scope] -- ^ The list of the permissions that the application requests. -> Maybe Int- -- ^ Expiration time (maximun and default value is an hour, 3600).+ -- ^ Expiration time (maximun and default value is an hour, 3600 seconds). -> PrivateKey -- ^ The private key gotten from the PEM string obtained from the -- Google API Console.@@ -111,7 +109,7 @@ <> toT (utSeconds t) <> "}") return $ either- (return $ Left "RSAError")- (\s -> return $ SignedJWT $ i <> "." <> encode (toStrict s))+ (pure $ Left "RSAError")+ (\s -> pure $ SignedJWT $ i <> "." <> encode (toStrict s)) (rsassa_pkcs1_v1_5_sign hashSHA256 pk $ fromStrict i)