úÎ6 2I:      !"#$%&'()*+,-./0123456789SafeCloud API exceptionToken exchange exceptions6Something went wrong with the request, token not found 0Errors associated with JWT-encoded token request Authentication key exceptions    !WebApiM and related functionality(c) Marco Zocca, 2018GPL-3zocca.marco gmail experimentalPOSIXNone 1<>?FKTJ ”The main type of the library. It can easily be re-used in libraries that interface with more than one cloud API provider because its type parameter c. lets us declare distinct behaviours for each.A O contains all information necessary to communicating with a cloud API provider:3Authentication credentials (e.g. username/password):Authentication token (used to authenticate every API call)(Options (e.g. GCP authentication scopes)An authentication  with an expiry date:Lift an `IO a` action into the  monad"Lift an `IO a` action into the V monad, and catch synchronous exceptions, while rethrowing the asynchronous ones to IO# Evaluate a  action, given a .+NB : Assumes all exceptions are handled by ;<0`cacheToken tok hdl` : Overwrite the token TVar tv containing a token if tok! carries a more recent timestamp.%wExtract the token content (needed to authenticate subsequent requests). The token will be valid for at least 60 seconds& Create a  with an initially empty token !"#$%& !Nonec'®Parse a chunk of text into an RSA private key. For Google Cloud Platform , this is the private key associated with the user's "service account" (for server-to-server API use) 1https://console.cloud.google.com/apis/credentials Note: do not[ supply the RSA header and footer or any newlines (they will be inserted by this function).'Safe;=FTÐNone<%Â(Create an authenticated = call)'Sending data with an authenticated call*The first function argument may be either + or ,*=' a lazy bytestring from an API endpoint+>E a request to an API endpoint and receive a lazy bytestring in return,?E a request to an API endpoint and receive a lazy bytestring in return@ produce a &c-separated list of parameters that can be passed to an HTTP querty from a list of key, value pairs ()*+,@A-BNone6.-9Lsend a POST request over HTTPS to a given URI that will return a OAuth2TokenCÒReturns the UTCTime (absolute) related to a delay in seconds from the time this function is executed. We need this helper function because the "expires_in" field in the OAuth2 response means "seconds from now".9 Request URI.parameter list as a list of (key, value) pairs#request options (e.g. headers) CICorrection for system delays (e.g. processing and network time). Positive'"seconds from now" parameter. Positive ./0123456789./01234567None>?KQV.ð ./0123456789 9./012345678 Main module(c) Marco Zocca, 2018GPL-3zocca.marco gmail experimentalPOSIXNone0«3  !"#$%&'()*+,-./0123*+,()&#" !%$'./012  -D      !"#$%&'()*+,-./012344567889:;<=>?@ABCDECDFCDGHIJKL$goggles-0.3.1-48NszkYxW2y2RqAp2GbHHaNetwork.GogglesNetwork.Goggles.Auth"Network.Goggles.Control.ExceptionsNetwork.Goggles.Cloud Data.KeysNetwork.Goggles.TypesNetwork.Utils.HTTPNetwork.Goggles.Auth.OAuth2CloudException UnknownErrorIOError TimeoutErrorJsonDecodeErrorXMLDecodeErrorTokenExchangeExceptionNotFoundAPICredentialsNotFoundJWTErrorBadExpirationTimeCryptoSignError KeyException NoSecretFound NoParsePKNoRSAKeyWebApiM runWebApiMHandle credentialstokenoptionsTokentTokentTimeHasToken TokenContentOptions tokenFetchHasCredentials Credentials liftWebApiIO evalWebApiIO refreshToken accessToken createHandleparseRSAPrivateKeygetLbsWithToken sendWithTokengetLbspostLbsputLbs urlEncode OAuth2TokenoaTokenExpirySeconds oaTokenString oaTokenTypeOAuth2TokenUTCoauTokenExpiryoauTokenString oauTokenTypemkOAuth2TokenUTCrequestOAuth2Token liftWebApiIO_'exceptions-0.8.3-6TQSgd6QYnC83Uf6EwjUmsControl.Monad.CatchthrowM cacheToken req-1.0.0-1LaIzPeSwkZCEcgjRcdIhzNetwork.HTTP.ReqGETPOSTPUTencodeHttpParametersLBencodeHttpParameters urlDecodetokenExpiryTime