mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(mobile): mtls on native clients (#25802)
* handle mtls on ios * update android impl * ui improvements * dead code * no need to store data separately * improve concurrency * dead code * add migration * remove unused dependency * trust user-installed certs * removed print statement * fix ios * improve android styling * outdated comments * update lock file * handle translation * fix prompt cancellation * fix video playback * Apply suggestion from @shenlong-tanwen Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> * Apply suggestion from @shenlong-tanwen Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> * formatting --------- Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import 'package:pigeon/pigeon.dart';
|
||||
|
||||
class ClientCertData {
|
||||
Uint8List data;
|
||||
String password;
|
||||
|
||||
ClientCertData(this.data, this.password);
|
||||
}
|
||||
|
||||
class ClientCertPrompt {
|
||||
String title;
|
||||
String message;
|
||||
String cancel;
|
||||
String confirm;
|
||||
|
||||
ClientCertPrompt(this.title, this.message, this.cancel, this.confirm);
|
||||
}
|
||||
|
||||
@ConfigurePigeon(
|
||||
PigeonOptions(
|
||||
dartOut: 'lib/platform/network_api.g.dart',
|
||||
swiftOut: 'ios/Runner/Core/Network.g.swift',
|
||||
swiftOptions: SwiftOptions(includeErrorClass: false),
|
||||
kotlinOut:
|
||||
'android/app/src/main/kotlin/app/alextran/immich/core/Network.g.kt',
|
||||
kotlinOptions: KotlinOptions(package: 'app.alextran.immich.core', includeErrorClass: true),
|
||||
dartOptions: DartOptions(),
|
||||
dartPackageName: 'immich_mobile',
|
||||
),
|
||||
)
|
||||
@HostApi()
|
||||
abstract class NetworkApi {
|
||||
@async
|
||||
void addCertificate(ClientCertData clientData);
|
||||
|
||||
@async
|
||||
ClientCertData selectCertificate(ClientCertPrompt promptText);
|
||||
|
||||
@async
|
||||
void removeCertificate();
|
||||
}
|
||||
Reference in New Issue
Block a user