Is it possible to used named credentials with a service account to connect to the Google Cloud Platform?
I'm trying to make a client to send Pub/Sub messages to Google Cloud from Apex, and it'd be great if I didn't have to worry about getting tokens.
This outlines how to get a token to make a request: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#authorizingrequests
This is how to do this in Apex, but without using Named Credentials: https://salesforce.stackexchange.com/a/71442/7215
I don't see how I'd specify how to request tokens and create the proper JWT with Named Credentials and none of the examples I've seen that do use Named Credentials, seem to have a JWT-based flow.