mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore(server): update openapi (#2205)
This commit is contained in:
parent
91e27affeb
commit
983abf5e14
65 changed files with 756 additions and 1458 deletions
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';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue