Closed paveltyk closed 2 years ago
This PR allows overriding self-signed JWT claims. Which in turn makes it easier to follow different token exchange scenarios:
iex> credentials = "credentials.json" |> File.read!() |> Jason.decode!() ...> claims = %{"target_audience" => "https://<GCP_REGION>-<PROJECT_ID>.cloudfunctions.net/<CLOUD_FUNCTION_NAME>"} ...> Goth.Token.fetch(%{source: {:service_account, credentials, [claims: claims]}}) {:ok, %Goth.Token{...}}
iex> credentials = "credentials.json" |> File.read!() |> Jason.decode!() ...> claims = %{"sub" => "<IMPERSONATED_ACCOUNT_EMAIL>"} ...> Goth.Token.fetch(%{source: {:service_account, credentials, [claims: claims]}}) {:ok, %Goth.Token{...}}
@wojtekmach Hi. Can you please give an ETA for this PR?
Thank you, sorry for the delay!
This PR allows overriding self-signed JWT claims. Which in turn makes it easier to follow different token exchange scenarios:
Cloud function invocation token (read more)
Impersonating account