I did make two functional changes from that draft:
Rather than interrogate and fetch an id_token during initialization, I moved that to the TokenSource.Token() method implementation. This avoids attempting to extract an id token in two places.
Rather than use an http.Client+JSON to request the token, I'm using the iamcredentials client.
This should read like https://github.com/grafeas/voucher/pull/56 , but decoupled from other pending changes.
I did make two functional changes from that draft:
id_token
during initialization, I moved that to theTokenSource.Token()
method implementation. This avoids attempting to extract an id token in two places.http.Client
+JSON to request the token, I'm using theiamcredentials
client.Related