8000 ValidationClient for client validation, add ClientValidationJwt by codejudas · Pull Request #309 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content

ValidationClient for client validation, add ClientValidationJwt #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 2, 2017

Conversation

codejudas
Copy link
Contributor

Still need to smoke test this.

@codejudas
Copy link
Contributor Author

✅ Smoke tested

@jingming
Copy link
Contributor

👍


def test_build_validation_payload_complex(self):
self.request.body = 'foobar'
self.request.url = self.request.url + '?WestCoast=BestCoast&EastCoast=LeastCoast'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with a more inclusive example here @efossier. :D

'sub': 'AC123',
}, jwt.payload)
self.assertGreaterEqual(jwt.payload['exp'], time.time(), 'JWT exp is before now')
self.assertLessEqual(jwt.payload['exp'], time.time() + 501, 'JWT exp is after now + 5mins')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

501 seconds is actually closer to 8 minutes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind.

input_str = input_str.encode('utf-8')

return sha256(input_str).hexdigest()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more 8000 .

Kill blank line.

@codejudas codejudas merged commit 7b9bf77 into next-gen Mar 2, 2017
@ilanbiala ilanbiala deleted the next-gen-client-validation branch July 11, 2017 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0