-
Notifications
You must be signed in to change notification settings - Fork 52
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
Tachyon connect #424
Merged
L-e-x-o-n
merged 13 commits into
beyond-all-reason:master
from
geekingfrog:tachyon-connect
Aug 26, 2024
Merged
Tachyon connect #424
L-e-x-o-n
merged 13 commits into
beyond-all-reason:master
from
geekingfrog:tachyon-connect
Aug 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geekingfrog
commented
Aug 24, 2024
@@ -1007,6 +1009,56 @@ defmodule Teiserver.CacheUser do | |||
end | |||
end | |||
|
|||
@spec tachyon_login(T.user(), String.t(), String.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.
This is mostly taken from login_from_token
geekingfrog
commented
Aug 24, 2024
""" | ||
@callback handle_info(term(), term()) :: WebSock.handle_result() | ||
|
||
# TODO: add other callbacks to handle (parsed) tachyon commands |
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.
This will come in a later PR
geekingfrog
force-pushed
the
tachyon-connect
branch
from
August 24, 2024 08:26
0d2840f
to
3a43f3d
Compare
The current implementation would *always* persist the user, regardless of the parameter passed in.
`get_user(nil, [])` works, but more by chance than anything, and it doesn't quite make sense.
Check there's a valid oauth token.
Must provide the correct tachyon version during subprotocol negotiation
Starts with the registry for player connection. This will be expanded later. The goal is to keep everything tachyon related together so that it's easier to see the dependencies between processes and manage initialisation of the components.
Not doing anything with them yet
Ensure that only the most recent connection is valid. Terminate existing connection when a new one comes in. The session can also track a player's state (connected/disconnected)
geekingfrog
force-pushed
the
tachyon-connect
branch
2 times, most recently
from
August 24, 2024 08:35
5aceec2
to
543daf7
Compare
geekingfrog
force-pushed
the
tachyon-connect
branch
from
August 24, 2024 19:13
543daf7
to
dd07fff
Compare
geekingfrog
added a commit
to geekingfrog/teiserver
that referenced
this pull request
Sep 11, 2024
Update tzdata lib
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the code to allow players and autohosts to connect using tachyon.
Local testing
teiserver.fakedata
. Otherwise create one through the admin interfacemix teiserver.gen_token --user root # can be any other user
mix phx.server
websocat ws://127.0.0.1:4000/tachyon --protocol v0.tachyon --header "Authorization: Bearer $TOKEN"
Overview
As usual, reviewing commit by commit should help. I am following the design doc. The main differences with the current way of doing things in teiserver are: