feat(web,server): logout all devices ()

* feat: logout all devices

* chore: regenerate openapi

* chore: add test

* chore: logout vs log out
This commit is contained in:
Jason Rasmussen 2023-05-09 15:34:17 -04:00 committed by GitHub
parent c956eee919
commit a808b9403e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 241 additions and 4 deletions
mobile/openapi/lib/api

View file

@ -282,6 +282,39 @@ class AuthenticationApi {
}
}
/// Performs an HTTP 'DELETE /auth/devices' operation and returns the [Response].
Future<Response> logoutAuthDevicesWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/auth/devices';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<void> logoutAuthDevices() async {
final response = await logoutAuthDevicesWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'POST /auth/validateToken' operation and returns the [Response].
Future<Response> validateAccessTokenWithHttpInfo() async {
// ignore: prefer_const_declarations