Skip to content

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

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

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
reosarevok added a commit to reosarevok/musicbrainz-server that referenced this pull request Feb 28, 2025
This uses the appropriate SVG icon from FontAwesome Free, which
seems like a pretty decent option, but filled in metabrainz#666 grey.

The 16px CSS setting for imgs inside 'buttons' is 15 years old or so
and I'm not sure where it even applies nowadays (I didn't find any
cases in a quick search but I might have missed some). 15px does seem
to work a lot better with our button style though, as suggested by
aerozol.

Having the text as aria-label, title *and* alt for the image
might be overkill, but there's no kill like overkill.
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.

None yet

2 participants