-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Get a signed JWT for Google Service Accounts
--   
--   This library implements the creation of the signed JWT for Google
--   Service Accounts.
@package google-oauth2-jwt
@version 0.2.2


-- | Create a signed JWT needed to make the access token request to gain
--   access to Google APIs for server to server applications.
--   
--   For all usage details, see
--   <a>https://developers.google.com/identity/protocols/OAuth2ServiceAccount</a>
module Network.Google.OAuth2.JWT
data SignedJWT
type Email = Text
type Scope = Text

-- | Create the signed JWT ready for transmission in the access token
--   request as assertion value.
--   
--   <pre>
--   grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&amp;assertion=
--   </pre>
getSignedJWT :: Email -> Maybe Email -> [Scope] -> Maybe Int -> PrivateKey -> IO (Either String SignedJWT)

-- | Get the private key obtained from the Google API Console from a PEM
--   <a>String</a>.
--   
--   <pre>
--   fromPEMString "-----BEGIN PRIVATE KEY-----\nB9e [...] bMdF\n-----END PRIVATE KEY-----\n"
--   </pre>
fromPEMString :: String -> IO PrivateKey

-- | Get the private key obtained from the Google API Console from a PEM
--   file.
fromPEMFile :: FilePath -> IO PrivateKey
instance GHC.Show.Show Network.Google.OAuth2.JWT.SignedJWT
instance GHC.Classes.Eq Network.Google.OAuth2.JWT.SignedJWT
