-
Notifications
You must be signed in to change notification settings - Fork 476
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
Add new SessionUtil method to retrieve current session Id from Shopify ID token #1314
Conversation
2006e37
to
3ed00c4
Compare
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.
Have a general question, but I don't think it needs to block this.
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.
Looks good to me! I just think it would be nice to have that extra test coverage.
|
||
assert_equal( | ||
expected_session_id, | ||
ShopifyAPI::Utils::SessionUtils.current_session_id(@auth_header, nil, false), |
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.
I know it's not new code we added in this PR, but can we expect to raise the missing JWT error when a valid token is present in the header but doesn't follow the Bearer {token}
format?
27de2f3
to
8ab3841
Compare
8ab3841
to
11cbcae
Compare
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.
🔥
Description
Please, include a summary of what the PR is for:
current_session_id
expects an "auth_header" that has format -Bearer id_token
, extracted the logic to retrieve the current session ID from justid_token
for supporting id token in URL paramImpact
current_session_id
will not be affected, behaviour remained the same.How has this been tested?
Checklist: