Remove one-time token behavior of JWT Credentials#117
Conversation
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| """ | ||
|
|
||
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/auth/jwt.py
Outdated
| kwargs.setdefault('issuer', info['client_email']) | ||
| return cls( | ||
| signer, | ||
| **kwargs) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| # (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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 'service_account.json') | ||
|
|
||
| Args: | ||
| audience (str): the `aud` claim. The intended audience for the |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
We good? |
|
@dhermes if you're good & travis is good then I'm good. |
|
Seems you gotta fix CI but LGTM otherwise |
Resolves #114