Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Add service_account.Credentials.with_claims#140

Merged
theacodes merged 2 commits intomasterfrom
service-account-claims
Mar 23, 2017
Merged

Add service_account.Credentials.with_claims#140
theacodes merged 2 commits intomasterfrom
service-account-claims

Conversation

@theacodes
Copy link
Contributor

@theacodes theacodes commented Mar 22, 2017

Resolves #129.

Returns:
google.auth.jwt.Credentials: A new credentials instance.
"""
new_additional_claims = self._additional_claims.copy()

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

google.auth.jwt.Credentials: A new credentials instance.
"""
new_additional_claims = self._additional_claims.copy()
new_additional_claims.update(additional_claims or {})

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

subject=subject,
additional_claims=self._additional_claims.copy())

def with_claims(self, additional_claims):

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Mar 23, 2017

LGTM I suppose. It seems you want to eat the teeny cost of or {} every time, so it's all good?

@theacodes
Copy link
Contributor Author

It seems you want to eat the teeny cost of or {} every time, so it's all good?

The cost of that vs. the cost of copy/deepcopy is insignificant.

I'm going to update this to use deepcopy, but I'm finishing something else up first. Thanks for the review!

@theacodes theacodes merged commit 75c78b2 into master Mar 23, 2017
@theacodes theacodes deleted the service-account-claims branch March 23, 2017 20:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants