Skip to content
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

Correctly add authorization header to Subscription.channel.header #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karlnaden
Copy link
Collaborator

Summary

Previously, when the Subscription Server tests tried to add a Subscription.channel.header value with a bearer token, it did so at the Subscription level instead. Now it does so correctly.

Testing Guidance

Run the Server tests agains the client tests following the instructions - see suite instructions - but removing the "header": ["Authorization: Bearer SAMPLE_TOKEN"], row from the Workflow Subscription Resource input on the server tests. Verify that the tests run correctly and that when viewing the client test responsible for verifying the Subscription creation (1.3.01 - Client Subscription Conformance Verification) that the Subscription creation request includes that content under Subscription.channel.

Copy link

@emichaud998 emichaud998 left a comment

Choose a reason for hiding this comment

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

Tested it out and it looks good to me!

@@ -77,8 +77,8 @@ def server_check_channel(subscription, access_token)
Added the Authorization header field with a Bearer token set to #{access_token} to the `header` field on the
Subscription resource in order to connect successfully with the Inferno subscription channel.
))
subscription['header'] = [] unless subscription['header'].present?
subscription['header'].append("Authorization: Bearer #{access_token}")
subscription_channel['header'] = [] unless subscription['header'].present?
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like you'd need this change as well?

Suggested change
subscription_channel['header'] = [] unless subscription['header'].present?
subscription_channel['header'] = [] unless subscription_channel['header'].present?

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