-
Notifications
You must be signed in to change notification settings - Fork 739
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
Add API LoginWizard.loginCustom(data: JsonDict): Session
#4346
Conversation
… to login to a homeserver using arbitrary request content
@@ -121,6 +121,10 @@ internal interface AuthAPI { | |||
@POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "login") | |||
suspend fun login(@Body loginParams: TokenLoginParams): Credentials | |||
|
|||
@Headers("CONNECT_TIMEOUT:60000", "READ_TIMEOUT:60000", "WRITE_TIMEOUT:60000") |
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.
are these timeouts different to the http client connection timeouts?
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.
Yes, I think so, here I've just copy pasted what was above without really thinking about it.
* Login to the homeserver by sending a custom JsonDict. | ||
* The data should contain at least one entry "type" with a String value. | ||
*/ | ||
suspend fun loginCustom(data: JsonDict): Session |
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.
should we enforce the type as a separate parameter and apply it to the jsonDict
, or is the documentation enough?
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.
I've thought about it, happy to see that you have the same thoughts, but here it will be up to the caller to do what's necessary for this API to work, and I did not want to close doors.
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.
some questions but no blockers from me! 💯
To be able to login to a homeserver using arbitrary request content
Fixes #4266