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

Refactor login packet handler for more flexible auth #298

Merged
merged 4 commits into from
Nov 17, 2024
Merged

Conversation

yungcomputerchair
Copy link
Member

This PR enables auth cookies to be used simultaneously with plaintext paasswords sent in the cookie authID field.

  • Hoist a bunch of checks from the login packet handler into helper functions.
  • Rename the LoginType enum to AuthMethod and distinguish it from the iLoginType packet field (see comment in code for why these should be decoupled).
  • If the provided token does not pass the cookie check and password auth is enabled, treat it as a plaintext password and authenticate if it is correct.

@dongresource dongresource merged commit 55cf3f7 into master Nov 17, 2024
6 checks passed
@yungcomputerchair yungcomputerchair deleted the auth branch November 17, 2024 04:21
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.

2 participants