Browse Source

fix security for loginFlow2

pull/236/head
Nikolas Rimikis 2 years ago
parent
commit
16701dfe6c
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 10
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  2. 2
      packages/nextcloud/lib/src/nextcloud.openapi.json
  3. 2
      specs/core.json

10
packages/nextcloud/lib/src/nextcloud.openapi.dart

@ -244,11 +244,6 @@ class NextcloudCoreClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else {
throw Exception('Missing authentication for basic_auth');
}
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'post', 'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(),
@ -269,11 +264,6 @@ class NextcloudCoreClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else {
throw Exception('Missing authentication for basic_auth');
}
queryParameters['token'] = token; queryParameters['token'] = token;
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'post', 'post',

2
packages/nextcloud/lib/src/nextcloud.openapi.json

@ -2069,6 +2069,7 @@
"tags": [ "tags": [
"core" "core"
], ],
"security": [],
"responses": { "responses": {
"200": { "200": {
"description": "Login flow init", "description": "Login flow init",
@ -2089,6 +2090,7 @@
"tags": [ "tags": [
"core" "core"
], ],
"security": [],
"parameters": [ "parameters": [
{ {
"name": "token", "name": "token",

2
specs/core.json

@ -1043,6 +1043,7 @@
"tags": [ "tags": [
"core" "core"
], ],
"security": [],
"responses": { "responses": {
"200": { "200": {
"description": "Login flow init", "description": "Login flow init",
@ -1063,6 +1064,7 @@
"tags": [ "tags": [
"core" "core"
], ],
"security": [],
"parameters": [ "parameters": [
{ {
"name": "token", "name": "token",

Loading…
Cancel
Save