@@ -2172,7 +2172,7 @@ public protocol ClientFido2AuthenticatorProtocol: AnyObject, Sendable {
21722172
21732173 func makeCredential( request: MakeCredentialRequest ) async throws -> MakeCredentialResult
21742174
2175- func silentlyDiscoverCredentials( rpId: String ) async throws -> [ Fido2CredentialAutofillView ]
2175+ func silentlyDiscoverCredentials( rpId: String , userHandle : Data ? ) async throws -> [ Fido2CredentialAutofillView ]
21762176
21772177}
21782178open class ClientFido2Authenticator : ClientFido2AuthenticatorProtocol , @unchecked Sendable {
@@ -2274,13 +2274,13 @@ open func makeCredential(request: MakeCredentialRequest)async throws -> MakeCre
22742274 )
22752275}
22762276
2277- open func silentlyDiscoverCredentials( rpId: String ) async throws -> [ Fido2CredentialAutofillView ] {
2277+ open func silentlyDiscoverCredentials( rpId: String , userHandle : Data ? ) async throws -> [ Fido2CredentialAutofillView ] {
22782278 return
22792279 try await uniffiRustCallAsync (
22802280 rustFutureFunc: {
22812281 uniffi_bitwarden_uniffi_fn_method_clientfido2authenticator_silently_discover_credentials (
22822282 self . uniffiCloneHandle ( ) ,
2283- FfiConverterString . lower ( rpId)
2283+ FfiConverterString . lower ( rpId) , FfiConverterOptionData . lower ( userHandle )
22842284 )
22852285 } ,
22862286 pollFunc: ffi_bitwarden_uniffi_rust_future_poll_rust_buffer,
@@ -3466,7 +3466,7 @@ public func FfiConverterTypeExporterClient_lower(_ value: ExporterClient) -> UIn
34663466
34673467public protocol Fido2CredentialStore : AnyObject , Sendable {
34683468
3469- func findCredentials( ids: [ Data ] ? , ripId: String ) async throws -> [ CipherView ]
3469+ func findCredentials( ids: [ Data ] ? , ripId: String , userHandle : Data ? ) async throws -> [ CipherView ]
34703470
34713471 func allCredentials( ) async throws -> [ CipherListView ]
34723472
@@ -3521,13 +3521,13 @@ open class Fido2CredentialStoreImpl: Fido2CredentialStore, @unchecked Sendable {
35213521
35223522
35233523
3524- open func findCredentials( ids: [ Data ] ? , ripId: String ) async throws -> [ CipherView ] {
3524+ open func findCredentials( ids: [ Data ] ? , ripId: String , userHandle : Data ? ) async throws -> [ CipherView ] {
35253525 return
35263526 try await uniffiRustCallAsync (
35273527 rustFutureFunc: {
35283528 uniffi_bitwarden_uniffi_fn_method_fido2credentialstore_find_credentials (
35293529 self . uniffiCloneHandle ( ) ,
3530- FfiConverterOptionSequenceData . lower ( ids) , FfiConverterString . lower ( ripId)
3530+ FfiConverterOptionSequenceData . lower ( ids) , FfiConverterString . lower ( ripId) , FfiConverterOptionData . lower ( userHandle )
35313531 )
35323532 } ,
35333533 pollFunc: ffi_bitwarden_uniffi_rust_future_poll_rust_buffer,
@@ -3603,6 +3603,7 @@ fileprivate struct UniffiCallbackInterfaceFido2CredentialStore {
36033603 uniffiHandle: UInt64 ,
36043604 ids: RustBuffer ,
36053605 ripId: RustBuffer ,
3606+ userHandle: RustBuffer ,
36063607 uniffiFutureCallback: @escaping UniffiForeignFutureCompleteRustBuffer ,
36073608 uniffiCallbackData: UInt64 ,
36083609 uniffiOutDroppedCallback: UnsafeMutablePointer < UniffiForeignFutureDroppedCallbackStruct >
@@ -3614,7 +3615,8 @@ fileprivate struct UniffiCallbackInterfaceFido2CredentialStore {
36143615 }
36153616 return try await uniffiObj. findCredentials (
36163617 ids: try FfiConverterOptionSequenceData . lift ( ids) ,
3617- ripId: try FfiConverterString . lift ( ripId)
3618+ ripId: try FfiConverterString . lift ( ripId) ,
3619+ userHandle: try FfiConverterOptionData . lift ( userHandle)
36183620 )
36193621 }
36203622
@@ -3804,7 +3806,7 @@ public protocol Fido2UserInterface: AnyObject, Sendable {
38043806
38053807 func checkUserAndPickCredentialForCreation( options: CheckUserOptions , newCredential: Fido2CredentialNewView ) async throws -> CheckUserAndPickCredentialForCreationResult
38063808
3807- func isVerificationEnabled( ) async -> Bool
3809+ func isVerificationEnabled( ) -> Bool
38083810
38093811}
38103812open class Fido2UserInterfaceImpl : Fido2UserInterface , @unchecked Sendable {
@@ -3906,22 +3908,12 @@ open func checkUserAndPickCredentialForCreation(options: CheckUserOptions, newCr
39063908 )
39073909}
39083910
3909- open func isVerificationEnabled( ) async -> Bool {
3910- return
3911- try ! await uniffiRustCallAsync (
3912- rustFutureFunc: {
3913- uniffi_bitwarden_uniffi_fn_method_fido2userinterface_is_verification_enabled (
3914- self . uniffiCloneHandle ( )
3915-
3916- )
3917- } ,
3918- pollFunc: ffi_bitwarden_uniffi_rust_future_poll_i8,
3919- completeFunc: ffi_bitwarden_uniffi_rust_future_complete_i8,
3920- freeFunc: ffi_bitwarden_uniffi_rust_future_free_i8,
3921- liftFunc: FfiConverterBool . lift,
3922- errorHandler: nil
3923-
3924- )
3911+ open func isVerificationEnabled( ) -> Bool {
3912+ return try ! FfiConverterBool . lift ( try ! rustCall ( ) {
3913+ uniffi_bitwarden_uniffi_fn_method_fido2userinterface_is_verification_enabled (
3914+ self . uniffiCloneHandle ( ) , $0
3915+ )
3916+ } )
39253917}
39263918
39273919}
@@ -4086,42 +4078,24 @@ fileprivate struct UniffiCallbackInterfaceFido2UserInterface {
40864078 } ,
40874079 isVerificationEnabled: { (
40884080 uniffiHandle: UInt64 ,
4089- uniffiFutureCallback: @escaping UniffiForeignFutureCompleteI8 ,
4090- uniffiCallbackData: UInt64 ,
4091- uniffiOutDroppedCallback: UnsafeMutablePointer < UniffiForeignFutureDroppedCallbackStruct >
4081+ uniffiOutReturn: UnsafeMutablePointer < Int8 > ,
4082+ uniffiCallStatus: UnsafeMutablePointer < RustCallStatus >
40924083 ) in
40934084 let makeCall = {
4094- ( ) async throws -> Bool in
4085+ ( ) throws -> Bool in
40954086 guard let uniffiObj = try ? FfiConverterTypeFido2UserInterface . handleMap. get ( handle: uniffiHandle) else {
40964087 throw UniffiInternalError . unexpectedStaleHandle
40974088 }
4098- return await uniffiObj. isVerificationEnabled (
4089+ return uniffiObj. isVerificationEnabled (
40994090 )
41004091 }
41014092
4102- let uniffiHandleSuccess = { ( returnValue: Bool ) in
4103- uniffiFutureCallback (
4104- uniffiCallbackData,
4105- UniffiForeignFutureResultI8 (
4106- returnValue: FfiConverterBool . lower ( returnValue) ,
4107- callStatus: RustCallStatus ( )
4108- )
4109- )
4110- }
4111- let uniffiHandleError = { ( statusCode, errorBuf) in
4112- uniffiFutureCallback (
4113- uniffiCallbackData,
4114- UniffiForeignFutureResultI8 (
4115- returnValue: 0 ,
4116- callStatus: RustCallStatus ( code: statusCode, errorBuf: errorBuf)
4117- )
4118- )
4119- }
4120- uniffiTraitInterfaceCallAsync (
4093+
4094+ let writeReturn = { uniffiOutReturn. pointee = FfiConverterBool . lower ( $0) }
4095+ uniffiTraitInterfaceCall (
4096+ callStatus: uniffiCallStatus,
41214097 makeCall: makeCall,
4122- handleSuccess: uniffiHandleSuccess,
4123- handleError: uniffiHandleError,
4124- droppedCallback: uniffiOutDroppedCallback
4098+ writeReturn: writeReturn
41254099 )
41264100 }
41274101 ) ]
@@ -7038,6 +7012,30 @@ fileprivate struct FfiConverterOptionString: FfiConverterRustBuffer {
70387012 }
70397013}
70407014
7015+ #if swift(>=5.8)
7016+ @_documentation ( visibility: private)
7017+ #endif
7018+ fileprivate struct FfiConverterOptionData : FfiConverterRustBuffer {
7019+ typealias SwiftType = Data ?
7020+
7021+ public static func write( _ value: SwiftType , into buf: inout [ UInt8 ] ) {
7022+ guard let value = value else {
7023+ writeInt ( & buf, Int8 ( 0 ) )
7024+ return
7025+ }
7026+ writeInt ( & buf, Int8 ( 1 ) )
7027+ FfiConverterData . write ( value, into: & buf)
7028+ }
7029+
7030+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SwiftType {
7031+ switch try readInt ( & buf) as Int8 {
7032+ case 0 : return nil
7033+ case 1 : return try FfiConverterData . read ( from: & buf)
7034+ default : throw UniffiInternalError . unexpectedOptionalTag
7035+ }
7036+ }
7037+ }
7038+
70417039#if swift(>=5.8)
70427040@_documentation ( visibility: private)
70437041#endif
@@ -7943,7 +7941,7 @@ private let initializationResult: InitializationResult = {
79437941 if ( uniffi_bitwarden_uniffi_checksum_method_clientfido2authenticator_make_credential ( ) != 60687 ) {
79447942 return InitializationResult . apiChecksumMismatch
79457943 }
7946- if ( uniffi_bitwarden_uniffi_checksum_method_clientfido2authenticator_silently_discover_credentials ( ) != 47262 ) {
7944+ if ( uniffi_bitwarden_uniffi_checksum_method_clientfido2authenticator_silently_discover_credentials ( ) != 58714 ) {
79477945 return InitializationResult . apiChecksumMismatch
79487946 }
79497947 if ( uniffi_bitwarden_uniffi_checksum_method_clientfido2client_authenticate ( ) != 36920 ) {
@@ -8030,7 +8028,7 @@ private let initializationResult: InitializationResult = {
80308028 if ( uniffi_bitwarden_uniffi_checksum_method_exporterclient_import_cxf ( ) != 25169 ) {
80318029 return InitializationResult . apiChecksumMismatch
80328030 }
8033- if ( uniffi_bitwarden_uniffi_checksum_method_fido2credentialstore_find_credentials ( ) != 37125 ) {
8031+ if ( uniffi_bitwarden_uniffi_checksum_method_fido2credentialstore_find_credentials ( ) != 51027 ) {
80348032 return InitializationResult . apiChecksumMismatch
80358033 }
80368034 if ( uniffi_bitwarden_uniffi_checksum_method_fido2credentialstore_all_credentials ( ) != 16553 ) {
@@ -8048,7 +8046,7 @@ private let initializationResult: InitializationResult = {
80488046 if ( uniffi_bitwarden_uniffi_checksum_method_fido2userinterface_check_user_and_pick_credential_for_creation ( ) != 20994 ) {
80498047 return InitializationResult . apiChecksumMismatch
80508048 }
8051- if ( uniffi_bitwarden_uniffi_checksum_method_fido2userinterface_is_verification_enabled ( ) != 40866 ) {
8049+ if ( uniffi_bitwarden_uniffi_checksum_method_fido2userinterface_is_verification_enabled ( ) != 29318 ) {
80528050 return InitializationResult . apiChecksumMismatch
80538051 }
80548052 if ( uniffi_bitwarden_uniffi_checksum_method_folderrepository_get ( ) != 11479 ) {
@@ -8170,17 +8168,17 @@ private let initializationResult: InitializationResult = {
81708168 uniffiCallbackInitFido2CredentialStore ( )
81718169 uniffiCallbackInitFido2UserInterface ( )
81728170 uniffiCallbackInitFolderRepository ( )
8173- uniffiEnsureBitwardenGeneratorsInitialized ( )
8174- uniffiEnsureBitwardenVaultInitialized ( )
8175- uniffiEnsureBitwardenEncodingInitialized ( )
81768171 uniffiEnsureBitwardenCoreInitialized ( )
8177- uniffiEnsureBitwardenSendInitialized ( )
8178- uniffiEnsureBitwardenExportersInitialized ( )
8172+ uniffiEnsureBitwardenVaultInitialized ( )
81798173 uniffiEnsureBitwardenCryptoInitialized ( )
8180- uniffiEnsureBitwardenFidoInitialized ( )
81818174 uniffiEnsureBitwardenCollectionsInitialized ( )
81828175 uniffiEnsureBitwardenSshInitialized ( )
81838176 uniffiEnsureBitwardenStateInitialized ( )
8177+ uniffiEnsureBitwardenSendInitialized ( )
8178+ uniffiEnsureBitwardenExportersInitialized ( )
8179+ uniffiEnsureBitwardenEncodingInitialized ( )
8180+ uniffiEnsureBitwardenFidoInitialized ( )
8181+ uniffiEnsureBitwardenGeneratorsInitialized ( )
81848182 return InitializationResult . ok
81858183} ( )
81868184
0 commit comments