Merge branch 'krille/make-path-configurable-uialogin' into 'main'
Krille/make path configurable uialogin See merge request famedly/company/frontend/famedlysdk!1031
This commit is contained in:
commit
54f87402b2
|
|
@ -1,3 +1,6 @@
|
|||
## [0.9.2] - 10th May 2022
|
||||
- chore: Make path configurable in uiaLogin
|
||||
|
||||
## [0.9.1] - 9th May 2022
|
||||
- feat: Store timestamp in the presence events
|
||||
- chore: Move auth object passing to external msc implementations
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ import 'package:matrix/matrix.dart';
|
|||
extension UiaLogin on Client {
|
||||
/// Implementation of MSC2835:
|
||||
/// https://github.com/Sorunome/matrix-doc/blob/soru/uia-on-login/proposals/2835-uia-on-login.md
|
||||
/// Set `pathVersion` to `r0` if you need to use the previous
|
||||
/// version of the login endpoint.
|
||||
Future<LoginResponse> uiaLogin(
|
||||
LoginType type, {
|
||||
String? address,
|
||||
|
|
@ -19,8 +21,9 @@ extension UiaLogin on Client {
|
|||
String? token,
|
||||
String? user,
|
||||
AuthenticationData? auth,
|
||||
String pathVersion = 'v3',
|
||||
}) async {
|
||||
final requestUri = Uri(path: '_matrix/client/v3/login');
|
||||
final requestUri = Uri(path: '_matrix/client/$pathVersion/login');
|
||||
final request = Request('POST', baseUri!.resolveUri(requestUri));
|
||||
request.headers['content-type'] = 'application/json';
|
||||
request.bodyBytes = utf8.encode(jsonEncode({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: matrix
|
||||
description: Matrix Dart SDK
|
||||
version: 0.9.1
|
||||
version: 0.9.2
|
||||
homepage: https://famedly.com
|
||||
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue