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
|
## [0.9.1] - 9th May 2022
|
||||||
- feat: Store timestamp in the presence events
|
- feat: Store timestamp in the presence events
|
||||||
- chore: Move auth object passing to external msc implementations
|
- chore: Move auth object passing to external msc implementations
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import 'package:matrix/matrix.dart';
|
||||||
extension UiaLogin on Client {
|
extension UiaLogin on Client {
|
||||||
/// Implementation of MSC2835:
|
/// Implementation of MSC2835:
|
||||||
/// https://github.com/Sorunome/matrix-doc/blob/soru/uia-on-login/proposals/2835-uia-on-login.md
|
/// 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(
|
Future<LoginResponse> uiaLogin(
|
||||||
LoginType type, {
|
LoginType type, {
|
||||||
String? address,
|
String? address,
|
||||||
|
|
@ -19,8 +21,9 @@ extension UiaLogin on Client {
|
||||||
String? token,
|
String? token,
|
||||||
String? user,
|
String? user,
|
||||||
AuthenticationData? auth,
|
AuthenticationData? auth,
|
||||||
|
String pathVersion = 'v3',
|
||||||
}) async {
|
}) async {
|
||||||
final requestUri = Uri(path: '_matrix/client/v3/login');
|
final requestUri = Uri(path: '_matrix/client/$pathVersion/login');
|
||||||
final request = Request('POST', baseUri!.resolveUri(requestUri));
|
final request = Request('POST', baseUri!.resolveUri(requestUri));
|
||||||
request.headers['content-type'] = 'application/json';
|
request.headers['content-type'] = 'application/json';
|
||||||
request.bodyBytes = utf8.encode(jsonEncode({
|
request.bodyBytes = utf8.encode(jsonEncode({
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: matrix
|
name: matrix
|
||||||
description: Matrix Dart SDK
|
description: Matrix Dart SDK
|
||||||
version: 0.9.1
|
version: 0.9.2
|
||||||
homepage: https://famedly.com
|
homepage: https://famedly.com
|
||||||
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue