-
Notifications
You must be signed in to change notification settings - Fork 329
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
Jw/changing how jwt is passed around #1130
Jw/changing how jwt is passed around #1130
Conversation
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.
Love the change! Let me know if you want help resolving some of the todo items. Other than that, I'd recommend moving this one to a normal PR state.
@shopifyski looks like the test CI failures are normal we can just re-run that job, but it looks like you need to run |
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.
Overall seems like a good change 👍 I left some feedback, feel free to ping me on slack if you have any questions. An additional heads up we are working on cutting a release this week so I will time the merging of this with that, likely after that just to be safe. Let me know if there are any timeline concerns and questions! Thanks!
@shopifyski looks like some checks CI failures that need to be addressed! I just ran ci. |
3205cdc
to
843c9f7
Compare
47c874b
to
37dc162
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.
LGTM! Thanks!
.map(|v| HeaderValue::from_maybe_shared(v).expect("Should already be valid header")) | ||
.ok_or(AuthError::AuthHeaderNotFound) | ||
.and_then(|h| h.to_str().map_err(|_| AuthError::AuthHeaderNonAscii)) | ||
.and_then(|t| UserAuthContext::from_auth_str(t)) |
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.
.and_then(|t| UserAuthContext::from_auth_str(t)) | |
.and_then(UserAuthContext::from_auth_str) |
btw if the input type is the same as the closure this works as well!
Standardized on a structure to pass around auth data instead of expecting downstream code to parse headers
pub struct UserAuthContext { pub scheme: Option<String>, pub token: Option<String>, }
an immediate follow up cleanup should address the following challenges: