-
Notifications
You must be signed in to change notification settings - Fork 0
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
Do not retrieve the auth-token on every call #2
Conversation
0f96d69
to
33d9b50
Compare
1d8a411
to
50254d9
Compare
describe '#retrieve_access_token' do | ||
subject { described_class.call } | ||
|
||
it 'sends request to token endpoint' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add request matchers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But they are in the cassette:
spec/vcr/icd/api/authorize_token.yml
So the vcr_cassette contains the right URL and also the response payload.
DEV-717
This PR fixes retrieving one auth token on every request, so using the TTL of the token to reuse the valid one.
This will reduce by half the response time for medical conditions search