Google Json Web Token
You can get serviceaccountemail from google developer console.
Google json web token. Handle the json response that the authorization server returns. Create a json web token jwt pronounced jot which includes a header a claim set and a signature. When you configure a client object you specify the scopes your application needs to access along with the url to your application s auth endpoint which will handle the response from the oauth 2 0 server. The claims in a jwt are encoded as a json object that is digitally signed using json web signature jws.
Json web token jwt is a compact url safe means of representing claims to be transferred between two parties. Write the below code where p12keyfilepath is the path to your json key file. Request an access token from the google oauth 2 0 authorization server. The keypassword will be asked while generating key.
By default it is notasecret and scopes takes all the scopes you require in your access token. To authenticate a user a client application must send a json web token jwt in the authorization header of the http request to your backend api. Using json web tokens jwts to authenticate to cloud iot core each device must prepare a json web token jwt rfc 7519. Use the client secrets json file that you created to configure a client object in your application.