Skip to content

Skip duplicate OAuth token lookup#12950

Open
josermzte wants to merge 2 commits into
ppy:masterfrom
josermzte:preload-oauth-token
Open

Skip duplicate OAuth token lookup#12950
josermzte wants to merge 2 commits into
ppy:masterfrom
josermzte:preload-oauth-token

Conversation

@josermzte
Copy link
Copy Markdown

Follow-up to #12922

BearerTokenValidator already loads the token for the revocation check, so we override it to eager-load the client and stash the Token on the request. AuthApi reuses it instead of re-querying. One less DB query per authed request.

Threw in some tests too.

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.

1 participant