-
Notifications
You must be signed in to change notification settings - Fork 66
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
MHV-58591 MHV-57739 Authentication for MHV Classic radiology endpoint #17381
Conversation
Generated by 🚫 Danger |
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.
Awesome!
before do | ||
allow(MedicalRecords::Client).to receive(:new).and_return(authenticated_client) | ||
allow(BBInternal::Client).to receive(:new).and_return(BBInternal::Client.new( | ||
session: { user_id: 15_176_497, | ||
patient_id: '15176498', | ||
expires_at: Time.current + (60 * 60), | ||
token: 'SESSION_TOKEN' } | ||
)) | ||
sign_in_as(current_user) | ||
end |
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.
@mmoyer-va could you refactor line 18 better spacing/readability. For example:
before do | |
allow(MedicalRecords::Client).to receive(:new).and_return(authenticated_client) | |
allow(BBInternal::Client).to receive(:new).and_return(BBInternal::Client.new( | |
session: { user_id: 15_176_497, | |
patient_id: '15176498', | |
expires_at: Time.current + (60 * 60), | |
token: 'SESSION_TOKEN' } | |
)) | |
sign_in_as(current_user) | |
end | |
before do | |
bb_internal_client = BBInternal::Client.new( | |
session: { | |
user_id: 15_176_497, | |
patient_id: '15176498', | |
expires_at: Time.current + 1.hour, | |
token: 'SESSION_TOKEN' | |
} | |
) | |
allow(MedicalRecords::Client).to receive(:new).and_return(authenticated_client) | |
allow(BBInternal::Client).to receive(:new).and_return(bb_internal_client) | |
sign_in_as(current_user) | |
end |
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.
@stevenjcumming thank you for the suggestion -- this is much better.
Summary
Related issue(s)
MHV-58591 - Add containerized authorization endpoint to radiology API calls
MHV-57739 - Connect vets-api to MHV radiology API(s)
Testing done
Screenshots
Note: Optional
What areas of the site does it impact?
MHV Medical Records
Acceptance criteria