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

Support full URL format as overload for creating sessions. #62

Open
Ijwu opened this issue Aug 5, 2022 · 6 comments
Open

Support full URL format as overload for creating sessions. #62

Ijwu opened this issue Aug 5, 2022 · 6 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@Ijwu
Copy link
Contributor

Ijwu commented Aug 5, 2022

Should support taking in one URL string to attempt to parse.

Format is: [scheme][<user>[:<password>]@]<address>:<port>

If scheme is not provided or is not ws:// then it should be replaced with ws://. If user (and subsequently, optionally, password) is provided then perhaps we can cache that and allow for a streamlined connection process?

@Ijwu Ijwu added enhancement New feature or request good first issue Good for newcomers labels Aug 5, 2022
@Berserker66
Copy link
Member

Berserker66 commented Sep 6, 2022

in race cases scheme could also be wss://
when the text client launch link on the webhost is used, the full url with username and such is in the client address bar, ready to be copied to other Py clients. Being able to also copy it into C# clients might be nice.

@Jarno458
Copy link
Collaborator

Jarno458 commented Nov 5, 2022

yeah we should support wss:// for people who do host it on a secure connection

@Jarno458
Copy link
Collaborator

Jarno458 commented Nov 5, 2022

i just tryed this myzelf it seems the webhost link is archipelago://Jarno2:@archipelago.gg:38281
so the scheme has to be replaced than still

@Jarno458
Copy link
Collaborator

Jarno458 commented Nov 5, 2022

While i can see this as a interesting thing to add it currently does not match our pattern
ArchipelagoSessionFactory.CreateSession(Uri uri) could totally support it but,
session.LoginAsync(string game, string name, ItemsHandlingFlags itemsHandlingFlags, Version version = null, string[] tags = null, string uuid = null, string password = null)
will be a problem. what do we supply as name than? make it optional?

@Jarno458 Jarno458 added question Further information is requested and removed good first issue Good for newcomers labels Nov 7, 2022
@Ijwu
Copy link
Contributor Author

Ijwu commented Nov 7, 2022

While i can see this as a interesting thing to add it currently does not match our pattern ArchipelagoSessionFactory.CreateSession(Uri uri) could totally support it but, session.LoginAsync(string game, string name, ItemsHandlingFlags itemsHandlingFlags, Version version = null, string[] tags = null, string uuid = null, string password = null) will be a problem. what do we supply as name than? make it optional?

image

You can get user info from that uri, I think.

@Jarno458
Copy link
Collaborator

Jarno458 commented Nov 10, 2022

Yes, i was more wondering how we should structure the code,
Should ArchipelagoSessionFactory have a new method that both sets up a session and connects?
and then possiably also the async over loads and a way to handle the logic results...
I dont think this should be a responseability of the SessionFactory,

i could have ArchipelagoSessionFactory.CreateSession(Uri uri)
and session.LoginAsync(string game, Uri uri, ItemsHandlingFlags itemsHandlingFlags, Version version = null, string[] tags = null, string uuid = null)
so to have an overload that supports the Uri, and removes the password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants