-
Notifications
You must be signed in to change notification settings - Fork 743
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add API `LoginWizard.loginCustom(data: JsonDict): Session` to be able to login to a homeserver using arbitrary request content |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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. |
||
@POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "login") | ||
suspend fun login(@Body loginParams: JsonDict): Credentials | ||
|
||
/** | ||
* Ask the homeserver to reset the password associated with the provided email. | ||
*/ | ||
|
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.