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

Remove one-time token behavior of JWT Credentials#117

Merged
theacodes merged 4 commits intomasterfrom
jwt-credential-audience
Feb 23, 2017
Merged

Remove one-time token behavior of JWT Credentials#117
theacodes merged 4 commits intomasterfrom
jwt-credential-audience

Conversation

@theacodes
Copy link
Contributor

Resolves #114

credentials = jwt.Credentials.from_service_account_file(
'service-account.json')
'service-account.json',
audience='https://speech.googleapis.com')

This comment was marked as spam.

This comment was marked as spam.

"""

def __init__(self, signer, issuer=None, subject=None, audience=None,
def __init__(self, signer, issuer, subject, audience,

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

kwargs.setdefault('issuer', info['client_email'])
return cls(
signer,
**kwargs)

This comment was marked as spam.

This comment was marked as spam.

audience (str): the `aud` claim. If not specified, a new
JWT will be generated for every request and will use
the request URI as the audience.
audience (str): the `aud` claim. If unspecified the current

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

# (pylint doesn't correctly recognize overridden methods.)
self.token, self.expiry = self._make_jwt()

@_helpers.copy_docstring(credentials.Signing)

This comment was marked as spam.

This comment was marked as spam.

def signer(self):
return self._signer

def before_request(self, request, method, url, headers):

This comment was marked as spam.

This comment was marked as spam.

'service_account.json')

Args:
audience (str): the `aud` claim. The intended audience for the

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Feb 23, 2017

We good?

@theacodes
Copy link
Contributor Author

@dhermes if you're good & travis is good then I'm good.

@dhermes
Copy link
Contributor

dhermes commented Feb 23, 2017

Seems you gotta fix CI but LGTM otherwise

@theacodes theacodes merged commit ab08689 into master Feb 23, 2017
@theacodes theacodes deleted the jwt-credential-audience branch February 23, 2017 17:20
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