mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
chore(server): update openapi (#2205)
This commit is contained in:
2
mobile/openapi/lib/auth/api_key_auth.dart
generated
2
mobile/openapi/lib/auth/api_key_auth.dart
generated
@@ -20,7 +20,7 @@ class ApiKeyAuth implements Authentication {
|
||||
String apiKey = '';
|
||||
|
||||
@override
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
|
||||
final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey';
|
||||
|
||||
if (paramValue.isNotEmpty) {
|
||||
|
||||
2
mobile/openapi/lib/auth/authentication.dart
generated
2
mobile/openapi/lib/auth/authentication.dart
generated
@@ -13,5 +13,5 @@ part of openapi.api;
|
||||
// ignore: one_member_abstracts
|
||||
abstract class Authentication {
|
||||
/// Apply authentication settings to header and query params.
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams);
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams);
|
||||
}
|
||||
|
||||
2
mobile/openapi/lib/auth/http_basic_auth.dart
generated
2
mobile/openapi/lib/auth/http_basic_auth.dart
generated
@@ -17,7 +17,7 @@ class HttpBasicAuth implements Authentication {
|
||||
String password;
|
||||
|
||||
@override
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
|
||||
if (username.isNotEmpty && password.isNotEmpty) {
|
||||
final credentials = '$username:$password';
|
||||
headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}';
|
||||
|
||||
2
mobile/openapi/lib/auth/http_bearer_auth.dart
generated
2
mobile/openapi/lib/auth/http_bearer_auth.dart
generated
@@ -27,7 +27,7 @@ class HttpBearerAuth implements Authentication {
|
||||
}
|
||||
|
||||
@override
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
|
||||
if (_accessToken == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
2
mobile/openapi/lib/auth/oauth.dart
generated
2
mobile/openapi/lib/auth/oauth.dart
generated
@@ -16,7 +16,7 @@ class OAuth implements Authentication {
|
||||
String accessToken;
|
||||
|
||||
@override
|
||||
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
|
||||
if (accessToken.isNotEmpty) {
|
||||
headerParams['Authorization'] = 'Bearer $accessToken';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user