2016-06-22
1.0.0
Miguel João
9.0.1.35
All
.NET
Connectors
[Overview]
GoogleAPIToken is a helper to obtain Google API Authentication Tokens to use with Google Cloud Platform REST APIs. It uses Google API service account with the correspondent private key.
[Detail]
GoogleAPIToken provides a method to generate an authentication bearer token in Google Cloud Platform services, which can then be used to authenticate REST API calls by sending the temporary token in a HTTP Authorization header, as described in the Google OAuth document article https://developers.google.com/identity/protocols/OAuth2ServiceAccount#callinganapi.
Implementation Details
It uses the Bouncy Castle .NET libraries to generate the RSA+SHA256 signature for JWT, from the PEM private key that exists in the service account JSON file, and obtains the authentication token by invoking Google Api Oauth API.
Return
The return value is a bearer authentication token that can be used in REST API calls to the Google Cloud Platform APIs. The bearer authentication token must be used as an HTTP header, per example:
Authorization: Bearer 1/fFBGRNJru1FQd44AzqT3Zg