diff --git a/lib/googleauth/service_account.rb b/lib/googleauth/service_account.rb index f7be414..84a4bfe 100644 --- a/lib/googleauth/service_account.rb +++ b/lib/googleauth/service_account.rb @@ -188,15 +188,15 @@ def principal def apply_self_signed_jwt! a_hash # Use the ServiceAccountJwtHeaderCredentials using the same cred values - cred_json = { - private_key: @signing_key.to_s, - client_email: @issuer, - project_id: @project_id, - quota_project_id: @quota_project_id - } - key_io = StringIO.new MultiJson.dump(cred_json) - alt = ServiceAccountJwtHeaderCredentials.make_creds json_key_io: key_io, scope: scope - alt.logger = logger + alt = ServiceAccountJwtHeaderCredentials.new( + private_key: @signing_key.to_s, + issuer: @issuer, + project_id: @project_id, + quota_project_id: @quota_project_id, + universe_domain: universe_domain, + scope: scope, + logger: logger + ) alt.apply! a_hash end