google-server-api-0.3.1.1: Google APIs for server to server applications

Safe HaskellNone
LanguageHaskell2010

Google.JWT

Description

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 https://developers.google.com/identity/protocols/OAuth2ServiceAccount

This module is borrowed from google-oauth2-jwt package.

Synopsis

Documentation

data JWT Source #

Instances
Eq JWT Source # 
Instance details

Defined in Google.JWT

Methods

(==) :: JWT -> JWT -> Bool #

(/=) :: JWT -> JWT -> Bool #

Read JWT Source # 
Instance details

Defined in Google.JWT

Show JWT Source # 
Instance details

Defined in Google.JWT

Methods

showsPrec :: Int -> JWT -> ShowS #

show :: JWT -> String #

showList :: [JWT] -> ShowS #

HasJWT JWT Source # 
Instance details

Defined in Google.JWT

Methods

getJwt :: JWT -> JWT Source #

class HasJWT a where Source #

Methods

getJwt :: a -> JWT Source #

Instances
HasJWT JWT Source # 
Instance details

Defined in Google.JWT

Methods

getJwt :: JWT -> JWT Source #

newtype Email Source #

Constructors

Email 

Fields

Instances
Eq Email Source # 
Instance details

Defined in Google.JWT

Methods

(==) :: Email -> Email -> Bool #

(/=) :: Email -> Email -> Bool #

Ord Email Source # 
Instance details

Defined in Google.JWT

Methods

compare :: Email -> Email -> Ordering #

(<) :: Email -> Email -> Bool #

(<=) :: Email -> Email -> Bool #

(>) :: Email -> Email -> Bool #

(>=) :: Email -> Email -> Bool #

max :: Email -> Email -> Email #

min :: Email -> Email -> Email #

Read Email Source # 
Instance details

Defined in Google.JWT

Show Email Source # 
Instance details

Defined in Google.JWT

Methods

showsPrec :: Int -> Email -> ShowS #

show :: Email -> String #

showList :: [Email] -> ShowS #

data Scope Source #

Instances
Eq Scope Source # 
Instance details

Defined in Google.JWT

Methods

(==) :: Scope -> Scope -> Bool #

(/=) :: Scope -> Scope -> Bool #

Ord Scope Source # 
Instance details

Defined in Google.JWT

Methods

compare :: Scope -> Scope -> Ordering #

(<) :: Scope -> Scope -> Bool #

(<=) :: Scope -> Scope -> Bool #

(>) :: Scope -> Scope -> Bool #

(>=) :: Scope -> Scope -> Bool #

max :: Scope -> Scope -> Scope #

min :: Scope -> Scope -> Scope #

Read Scope Source # 
Instance details

Defined in Google.JWT

Show Scope Source # 
Instance details

Defined in Google.JWT

Methods

showsPrec :: Int -> Scope -> ShowS #

show :: Scope -> String #

showList :: [Scope] -> ShowS #

getSignedJWT Source #

Arguments

:: JWT 
-> Maybe Email

The email address of the user for which the application is requesting delegated access.

-> [Scope]

The list of the permissions that the application requests.

-> Maybe Int

Expiration time (maximum and default value is an hour, 3600).

-> IO (Either String SignedJWT)

Either an error message or a signed JWT.

Create the signed JWT ready for transmission in the access token request as assertion value.

grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=