Conversation
google/auth/_helpers.py
Outdated
| import six | ||
|
|
||
|
|
||
| def now(): |
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/_helpers.py
Outdated
|
|
||
|
|
||
| def now(): | ||
| """Gets the current UTC datetime.""" |
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.
|
|
||
| def datetime_to_secs(value): | ||
| """Convert a datetime object to the number of seconds since the UNIX epoch. | ||
| """ |
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
|
|
||
|
|
||
| _DEFAULT_TOKEN_LIFETIME_SECS = 3600 # 1 hour in sections | ||
| CLOCK_SKEW_SECS = 300 # 5 minutes in seconds |
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.
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.
| """Make a signed JWT. | ||
|
|
||
| Args: | ||
| signer (google.auth.crypt.Signer): The signer used to sign the JWT. |
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.
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
| token (Union[str, bytes]): The encoded JWT. | ||
|
|
||
| Returns: | ||
| Tuple(str, str, str, str): header, payload, signed_setion, and |
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
| certs = [certs[key_id]] | ||
| # If there's no key id in the header, check against all of the certs. | ||
| else: | ||
| certs = certs.values() |
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.
| @@ -0,0 +1,175 @@ | |||
| # Copyright 2014 Google Inc. | |||
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.
| PUBLIC_CERT_BYTES = fh.read() | ||
|
|
||
| with open(os.path.join(DATA_DIR, 'other_cert.pem'), 'rb') as fh: | ||
| OTHER_CERT_BYTES = fh.read() |
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.
| OTHER_CERT_BYTES = fh.read() | ||
|
|
||
|
|
||
| @pytest.fixture |
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.
|
LGTM? |
|
Thanks for reviewing, @dhermes. :) |
No description provided.