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

MBS-9704: Skip checking credentials twice for WS #666

Merged
merged 1 commit into from May 11, 2018

Conversation

yvanzo
Copy link
Contributor

@yvanzo yvanzo commented May 8, 2018

Fix MBS-9704: 400 Bad Request error when requesting user-tags (or user-ratings) and user-collections

WS::2 'authenticate' is used to authenticate user from credentials and to check authorization scope.

Calling it twice was calling Catalyst 'authenticate' twice in a row which is not supposed to happen, thus returning 400 Bad Request error.

This patch skips authenticating from credentials again if user already exists, that is, it has already been successfully authenticated from credentials.

WS::2 'authenticate' still checks authorization scope.

`WS::2 'authenticate'` is used to authenticate user from credentials
and to check authorization scope.

Calling it twice was calling `Catalyst 'authenticate'` twice in a
row which is not supposed to happen, thus returning 400 Bad Request
error.

This patch skips authenticating from credentials again if user
already exists, that is, it has already been successfully
authenticated from credentials.

`WS::2 'authenticate'` still checks authorization scope.
@yvanzo yvanzo requested a review from mwiencek May 8, 2018 09:37
@yvanzo yvanzo merged commit ba5c4b9 into metabrainz:master May 11, 2018
@yvanzo yvanzo deleted the mbs-9704-fix-ws2-auth branch July 26, 2018 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants