1
0

feat(BRIDGE-424): FIDO2 GUI support.

This commit is contained in:
Atanas Janeshliev
2025-09-16 13:07:45 +02:00
parent e091e58be1
commit edf903fd21
42 changed files with 3567 additions and 3510 deletions

File diff suppressed because it is too large Load Diff

View File

@ -63,8 +63,10 @@ service Bridge {
// login
rpc Login(LoginRequest) returns (google.protobuf.Empty);
rpc Login2FA(LoginRequest) returns (google.protobuf.Empty);
rpc LoginFido(LoginRequest) returns (google.protobuf.Empty);
rpc Login2Passwords(LoginRequest) returns (google.protobuf.Empty);
rpc LoginAbort(LoginAbortRequest) returns (google.protobuf.Empty);
rpc FidoAssertionAbort(LoginAbortRequest) returns (google.protobuf.Empty);
// update
rpc CheckUpdate(google.protobuf.Empty) returns (google.protobuf.Empty);
@ -313,6 +315,11 @@ message LoginEvent {
LoginFinishedEvent finished = 4;
LoginFinishedEvent alreadyLoggedIn = 5;
LoginHvRequestedEvent hvRequested = 6;
LoginFidoRequestedEvent fidoRequested = 7;
LoginTfaOrFidoRequestedEvent tfaOrFidoRequested = 8;
LoginFidoTouchEvent loginFidoTouchRequested = 9;
LoginFidoTouchEvent loginFidoTouchCompleted = 10;
LoginFidoPinRequired loginFidoPinRequired = 11;
}
}
@ -325,6 +332,9 @@ enum LoginErrorType {
TWO_PASSWORDS_ERROR = 5;
TWO_PASSWORDS_ABORT = 6;
HV_ERROR = 7;
FIDO_PIN_INVALID = 8;
FIDO_PIN_BLOCKED = 9;
FIDO_ERROR = 10;
}
message LoginErrorEvent {
@ -336,6 +346,22 @@ message LoginTfaRequestedEvent {
string username = 1;
}
message LoginFidoRequestedEvent {
string username = 1;
}
message LoginTfaOrFidoRequestedEvent {
string username = 1;
}
message LoginFidoTouchEvent {
string username = 1;
}
message LoginFidoPinRequired {
string username = 1;
}
message LoginTwoPasswordsRequestedEvent {
string username = 1;
}

View File

@ -17,8 +17,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.21.12
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.29.5
// source: bridge.proto
package grpc
@ -34,8 +34,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Bridge_CheckTokens_FullMethodName = "/grpc.Bridge/CheckTokens"
@ -69,8 +69,10 @@ const (
Bridge_RequestKnowledgeBaseSuggestions_FullMethodName = "/grpc.Bridge/RequestKnowledgeBaseSuggestions"
Bridge_Login_FullMethodName = "/grpc.Bridge/Login"
Bridge_Login2FA_FullMethodName = "/grpc.Bridge/Login2FA"
Bridge_LoginFido_FullMethodName = "/grpc.Bridge/LoginFido"
Bridge_Login2Passwords_FullMethodName = "/grpc.Bridge/Login2Passwords"
Bridge_LoginAbort_FullMethodName = "/grpc.Bridge/LoginAbort"
Bridge_FidoAssertionAbort_FullMethodName = "/grpc.Bridge/FidoAssertionAbort"
Bridge_CheckUpdate_FullMethodName = "/grpc.Bridge/CheckUpdate"
Bridge_InstallUpdate_FullMethodName = "/grpc.Bridge/InstallUpdate"
Bridge_SetIsAutomaticUpdateOn_FullMethodName = "/grpc.Bridge/SetIsAutomaticUpdateOn"
@ -104,6 +106,12 @@ const (
// BridgeClient is the client API for Bridge service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// **********************************************************************************************************************
//
// Service Declaration
//
// **********************************************************************************************************************≠––
type BridgeClient interface {
// App related calls
CheckTokens(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
@ -138,8 +146,10 @@ type BridgeClient interface {
// login
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
Login2FA(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
LoginFido(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
Login2Passwords(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
LoginAbort(ctx context.Context, in *LoginAbortRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
FidoAssertionAbort(ctx context.Context, in *LoginAbortRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// update
CheckUpdate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
InstallUpdate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
@ -172,7 +182,7 @@ type BridgeClient interface {
InstallTLSCertificate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
ExportTLSCertificates(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Server -> Client event stream
RunEventStream(ctx context.Context, in *EventStreamRequest, opts ...grpc.CallOption) (Bridge_RunEventStreamClient, error)
RunEventStream(ctx context.Context, in *EventStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamEvent], error)
StopEventStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Repair
TriggerRepair(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
@ -187,8 +197,9 @@ func NewBridgeClient(cc grpc.ClientConnInterface) BridgeClient {
}
func (c *bridgeClient) CheckTokens(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_CheckTokens_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_CheckTokens_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -196,8 +207,9 @@ func (c *bridgeClient) CheckTokens(ctx context.Context, in *wrapperspb.StringVal
}
func (c *bridgeClient) AddLogEntry(ctx context.Context, in *AddLogEntryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_AddLogEntry_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_AddLogEntry_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -205,8 +217,9 @@ func (c *bridgeClient) AddLogEntry(ctx context.Context, in *AddLogEntryRequest,
}
func (c *bridgeClient) GuiReady(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GuiReadyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GuiReadyResponse)
err := c.cc.Invoke(ctx, Bridge_GuiReady_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_GuiReady_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -214,8 +227,9 @@ func (c *bridgeClient) GuiReady(ctx context.Context, in *emptypb.Empty, opts ...
}
func (c *bridgeClient) Quit(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_Quit_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_Quit_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -223,8 +237,9 @@ func (c *bridgeClient) Quit(ctx context.Context, in *emptypb.Empty, opts ...grpc
}
func (c *bridgeClient) Restart(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_Restart_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_Restart_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -232,8 +247,9 @@ func (c *bridgeClient) Restart(ctx context.Context, in *emptypb.Empty, opts ...g
}
func (c *bridgeClient) ShowOnStartup(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_ShowOnStartup_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_ShowOnStartup_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -241,8 +257,9 @@ func (c *bridgeClient) ShowOnStartup(ctx context.Context, in *emptypb.Empty, opt
}
func (c *bridgeClient) SetIsAutostartOn(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetIsAutostartOn_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetIsAutostartOn_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -250,8 +267,9 @@ func (c *bridgeClient) SetIsAutostartOn(ctx context.Context, in *wrapperspb.Bool
}
func (c *bridgeClient) IsAutostartOn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_IsAutostartOn_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_IsAutostartOn_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -259,8 +277,9 @@ func (c *bridgeClient) IsAutostartOn(ctx context.Context, in *emptypb.Empty, opt
}
func (c *bridgeClient) SetIsBetaEnabled(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetIsBetaEnabled_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetIsBetaEnabled_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -268,8 +287,9 @@ func (c *bridgeClient) SetIsBetaEnabled(ctx context.Context, in *wrapperspb.Bool
}
func (c *bridgeClient) IsBetaEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_IsBetaEnabled_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_IsBetaEnabled_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -277,8 +297,9 @@ func (c *bridgeClient) IsBetaEnabled(ctx context.Context, in *emptypb.Empty, opt
}
func (c *bridgeClient) SetIsAllMailVisible(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetIsAllMailVisible_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetIsAllMailVisible_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -286,8 +307,9 @@ func (c *bridgeClient) SetIsAllMailVisible(ctx context.Context, in *wrapperspb.B
}
func (c *bridgeClient) IsAllMailVisible(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_IsAllMailVisible_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_IsAllMailVisible_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -295,8 +317,9 @@ func (c *bridgeClient) IsAllMailVisible(ctx context.Context, in *emptypb.Empty,
}
func (c *bridgeClient) SetIsTelemetryDisabled(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetIsTelemetryDisabled_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetIsTelemetryDisabled_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -304,8 +327,9 @@ func (c *bridgeClient) SetIsTelemetryDisabled(ctx context.Context, in *wrappersp
}
func (c *bridgeClient) IsTelemetryDisabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_IsTelemetryDisabled_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_IsTelemetryDisabled_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -313,8 +337,9 @@ func (c *bridgeClient) IsTelemetryDisabled(ctx context.Context, in *emptypb.Empt
}
func (c *bridgeClient) GoOs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_GoOs_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_GoOs_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -322,8 +347,9 @@ func (c *bridgeClient) GoOs(ctx context.Context, in *emptypb.Empty, opts ...grpc
}
func (c *bridgeClient) TriggerReset(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_TriggerReset_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_TriggerReset_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -331,8 +357,9 @@ func (c *bridgeClient) TriggerReset(ctx context.Context, in *emptypb.Empty, opts
}
func (c *bridgeClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_Version_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_Version_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -340,8 +367,9 @@ func (c *bridgeClient) Version(ctx context.Context, in *emptypb.Empty, opts ...g
}
func (c *bridgeClient) LogsPath(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_LogsPath_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_LogsPath_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -349,8 +377,9 @@ func (c *bridgeClient) LogsPath(ctx context.Context, in *emptypb.Empty, opts ...
}
func (c *bridgeClient) LicensePath(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_LicensePath_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_LicensePath_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -358,8 +387,9 @@ func (c *bridgeClient) LicensePath(ctx context.Context, in *emptypb.Empty, opts
}
func (c *bridgeClient) ReleaseNotesPageLink(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_ReleaseNotesPageLink_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_ReleaseNotesPageLink_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -367,8 +397,9 @@ func (c *bridgeClient) ReleaseNotesPageLink(ctx context.Context, in *emptypb.Emp
}
func (c *bridgeClient) DependencyLicensesLink(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_DependencyLicensesLink_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_DependencyLicensesLink_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -376,8 +407,9 @@ func (c *bridgeClient) DependencyLicensesLink(ctx context.Context, in *emptypb.E
}
func (c *bridgeClient) LandingPageLink(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_LandingPageLink_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_LandingPageLink_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -385,8 +417,9 @@ func (c *bridgeClient) LandingPageLink(ctx context.Context, in *emptypb.Empty, o
}
func (c *bridgeClient) SetColorSchemeName(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetColorSchemeName_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetColorSchemeName_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -394,8 +427,9 @@ func (c *bridgeClient) SetColorSchemeName(ctx context.Context, in *wrapperspb.St
}
func (c *bridgeClient) ColorSchemeName(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_ColorSchemeName_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_ColorSchemeName_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -403,8 +437,9 @@ func (c *bridgeClient) ColorSchemeName(ctx context.Context, in *emptypb.Empty, o
}
func (c *bridgeClient) CurrentEmailClient(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_CurrentEmailClient_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_CurrentEmailClient_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -412,8 +447,9 @@ func (c *bridgeClient) CurrentEmailClient(ctx context.Context, in *emptypb.Empty
}
func (c *bridgeClient) ReportBug(ctx context.Context, in *ReportBugRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_ReportBug_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_ReportBug_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -421,8 +457,9 @@ func (c *bridgeClient) ReportBug(ctx context.Context, in *ReportBugRequest, opts
}
func (c *bridgeClient) ForceLauncher(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_ForceLauncher_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_ForceLauncher_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -430,8 +467,9 @@ func (c *bridgeClient) ForceLauncher(ctx context.Context, in *wrapperspb.StringV
}
func (c *bridgeClient) SetMainExecutable(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetMainExecutable_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetMainExecutable_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -439,8 +477,9 @@ func (c *bridgeClient) SetMainExecutable(ctx context.Context, in *wrapperspb.Str
}
func (c *bridgeClient) RequestKnowledgeBaseSuggestions(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_RequestKnowledgeBaseSuggestions_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_RequestKnowledgeBaseSuggestions_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -448,8 +487,9 @@ func (c *bridgeClient) RequestKnowledgeBaseSuggestions(ctx context.Context, in *
}
func (c *bridgeClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_Login_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_Login_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -457,8 +497,19 @@ func (c *bridgeClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc
}
func (c *bridgeClient) Login2FA(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_Login2FA_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_Login2FA_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bridgeClient) LoginFido(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_LoginFido_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -466,8 +517,9 @@ func (c *bridgeClient) Login2FA(ctx context.Context, in *LoginRequest, opts ...g
}
func (c *bridgeClient) Login2Passwords(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_Login2Passwords_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_Login2Passwords_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -475,8 +527,19 @@ func (c *bridgeClient) Login2Passwords(ctx context.Context, in *LoginRequest, op
}
func (c *bridgeClient) LoginAbort(ctx context.Context, in *LoginAbortRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_LoginAbort_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_LoginAbort_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bridgeClient) FidoAssertionAbort(ctx context.Context, in *LoginAbortRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_FidoAssertionAbort_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -484,8 +547,9 @@ func (c *bridgeClient) LoginAbort(ctx context.Context, in *LoginAbortRequest, op
}
func (c *bridgeClient) CheckUpdate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_CheckUpdate_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_CheckUpdate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -493,8 +557,9 @@ func (c *bridgeClient) CheckUpdate(ctx context.Context, in *emptypb.Empty, opts
}
func (c *bridgeClient) InstallUpdate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_InstallUpdate_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_InstallUpdate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -502,8 +567,9 @@ func (c *bridgeClient) InstallUpdate(ctx context.Context, in *emptypb.Empty, opt
}
func (c *bridgeClient) SetIsAutomaticUpdateOn(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetIsAutomaticUpdateOn_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetIsAutomaticUpdateOn_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -511,8 +577,9 @@ func (c *bridgeClient) SetIsAutomaticUpdateOn(ctx context.Context, in *wrappersp
}
func (c *bridgeClient) IsAutomaticUpdateOn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_IsAutomaticUpdateOn_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_IsAutomaticUpdateOn_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -520,8 +587,9 @@ func (c *bridgeClient) IsAutomaticUpdateOn(ctx context.Context, in *emptypb.Empt
}
func (c *bridgeClient) DiskCachePath(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_DiskCachePath_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_DiskCachePath_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -529,8 +597,9 @@ func (c *bridgeClient) DiskCachePath(ctx context.Context, in *emptypb.Empty, opt
}
func (c *bridgeClient) SetDiskCachePath(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetDiskCachePath_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetDiskCachePath_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -538,8 +607,9 @@ func (c *bridgeClient) SetDiskCachePath(ctx context.Context, in *wrapperspb.Stri
}
func (c *bridgeClient) SetIsDoHEnabled(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetIsDoHEnabled_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetIsDoHEnabled_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -547,8 +617,9 @@ func (c *bridgeClient) SetIsDoHEnabled(ctx context.Context, in *wrapperspb.BoolV
}
func (c *bridgeClient) IsDoHEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_IsDoHEnabled_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_IsDoHEnabled_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -556,8 +627,9 @@ func (c *bridgeClient) IsDoHEnabled(ctx context.Context, in *emptypb.Empty, opts
}
func (c *bridgeClient) MailServerSettings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ImapSmtpSettings, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ImapSmtpSettings)
err := c.cc.Invoke(ctx, Bridge_MailServerSettings_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_MailServerSettings_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -565,8 +637,9 @@ func (c *bridgeClient) MailServerSettings(ctx context.Context, in *emptypb.Empty
}
func (c *bridgeClient) SetMailServerSettings(ctx context.Context, in *ImapSmtpSettings, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetMailServerSettings_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetMailServerSettings_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -574,8 +647,9 @@ func (c *bridgeClient) SetMailServerSettings(ctx context.Context, in *ImapSmtpSe
}
func (c *bridgeClient) Hostname(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_Hostname_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_Hostname_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -583,8 +657,9 @@ func (c *bridgeClient) Hostname(ctx context.Context, in *emptypb.Empty, opts ...
}
func (c *bridgeClient) IsPortFree(ctx context.Context, in *wrapperspb.Int32Value, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_IsPortFree_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_IsPortFree_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -592,8 +667,9 @@ func (c *bridgeClient) IsPortFree(ctx context.Context, in *wrapperspb.Int32Value
}
func (c *bridgeClient) AvailableKeychains(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*AvailableKeychainsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AvailableKeychainsResponse)
err := c.cc.Invoke(ctx, Bridge_AvailableKeychains_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_AvailableKeychains_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -601,8 +677,9 @@ func (c *bridgeClient) AvailableKeychains(ctx context.Context, in *emptypb.Empty
}
func (c *bridgeClient) SetCurrentKeychain(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetCurrentKeychain_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetCurrentKeychain_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -610,8 +687,9 @@ func (c *bridgeClient) SetCurrentKeychain(ctx context.Context, in *wrapperspb.St
}
func (c *bridgeClient) CurrentKeychain(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, Bridge_CurrentKeychain_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_CurrentKeychain_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -619,8 +697,9 @@ func (c *bridgeClient) CurrentKeychain(ctx context.Context, in *emptypb.Empty, o
}
func (c *bridgeClient) GetUserList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserListResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UserListResponse)
err := c.cc.Invoke(ctx, Bridge_GetUserList_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_GetUserList_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -628,8 +707,9 @@ func (c *bridgeClient) GetUserList(ctx context.Context, in *emptypb.Empty, opts
}
func (c *bridgeClient) GetUser(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*User, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(User)
err := c.cc.Invoke(ctx, Bridge_GetUser_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_GetUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -637,8 +717,9 @@ func (c *bridgeClient) GetUser(ctx context.Context, in *wrapperspb.StringValue,
}
func (c *bridgeClient) SetUserSplitMode(ctx context.Context, in *UserSplitModeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SetUserSplitMode_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SetUserSplitMode_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -646,8 +727,9 @@ func (c *bridgeClient) SetUserSplitMode(ctx context.Context, in *UserSplitModeRe
}
func (c *bridgeClient) SendBadEventUserFeedback(ctx context.Context, in *UserBadEventFeedbackRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_SendBadEventUserFeedback_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_SendBadEventUserFeedback_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -655,8 +737,9 @@ func (c *bridgeClient) SendBadEventUserFeedback(ctx context.Context, in *UserBad
}
func (c *bridgeClient) LogoutUser(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_LogoutUser_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_LogoutUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -664,8 +747,9 @@ func (c *bridgeClient) LogoutUser(ctx context.Context, in *wrapperspb.StringValu
}
func (c *bridgeClient) RemoveUser(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_RemoveUser_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_RemoveUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -673,8 +757,9 @@ func (c *bridgeClient) RemoveUser(ctx context.Context, in *wrapperspb.StringValu
}
func (c *bridgeClient) ConfigureUserAppleMail(ctx context.Context, in *ConfigureAppleMailRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_ConfigureUserAppleMail_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_ConfigureUserAppleMail_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -682,8 +767,9 @@ func (c *bridgeClient) ConfigureUserAppleMail(ctx context.Context, in *Configure
}
func (c *bridgeClient) IsTLSCertificateInstalled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, Bridge_IsTLSCertificateInstalled_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_IsTLSCertificateInstalled_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -691,8 +777,9 @@ func (c *bridgeClient) IsTLSCertificateInstalled(ctx context.Context, in *emptyp
}
func (c *bridgeClient) InstallTLSCertificate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_InstallTLSCertificate_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_InstallTLSCertificate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -700,20 +787,22 @@ func (c *bridgeClient) InstallTLSCertificate(ctx context.Context, in *emptypb.Em
}
func (c *bridgeClient) ExportTLSCertificates(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_ExportTLSCertificates_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_ExportTLSCertificates_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bridgeClient) RunEventStream(ctx context.Context, in *EventStreamRequest, opts ...grpc.CallOption) (Bridge_RunEventStreamClient, error) {
stream, err := c.cc.NewStream(ctx, &Bridge_ServiceDesc.Streams[0], Bridge_RunEventStream_FullMethodName, opts...)
func (c *bridgeClient) RunEventStream(ctx context.Context, in *EventStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamEvent], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Bridge_ServiceDesc.Streams[0], Bridge_RunEventStream_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &bridgeRunEventStreamClient{stream}
x := &grpc.GenericClientStream[EventStreamRequest, StreamEvent]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
@ -723,26 +812,13 @@ func (c *bridgeClient) RunEventStream(ctx context.Context, in *EventStreamReques
return x, nil
}
type Bridge_RunEventStreamClient interface {
Recv() (*StreamEvent, error)
grpc.ClientStream
}
type bridgeRunEventStreamClient struct {
grpc.ClientStream
}
func (x *bridgeRunEventStreamClient) Recv() (*StreamEvent, error) {
m := new(StreamEvent)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Bridge_RunEventStreamClient = grpc.ServerStreamingClient[StreamEvent]
func (c *bridgeClient) StopEventStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_StopEventStream_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_StopEventStream_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -750,8 +826,9 @@ func (c *bridgeClient) StopEventStream(ctx context.Context, in *emptypb.Empty, o
}
func (c *bridgeClient) TriggerRepair(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, Bridge_TriggerRepair_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Bridge_TriggerRepair_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -760,7 +837,13 @@ func (c *bridgeClient) TriggerRepair(ctx context.Context, in *emptypb.Empty, opt
// BridgeServer is the server API for Bridge service.
// All implementations must embed UnimplementedBridgeServer
// for forward compatibility
// for forward compatibility.
//
// **********************************************************************************************************************
//
// Service Declaration
//
// **********************************************************************************************************************≠––
type BridgeServer interface {
// App related calls
CheckTokens(context.Context, *wrapperspb.StringValue) (*wrapperspb.StringValue, error)
@ -795,8 +878,10 @@ type BridgeServer interface {
// login
Login(context.Context, *LoginRequest) (*emptypb.Empty, error)
Login2FA(context.Context, *LoginRequest) (*emptypb.Empty, error)
LoginFido(context.Context, *LoginRequest) (*emptypb.Empty, error)
Login2Passwords(context.Context, *LoginRequest) (*emptypb.Empty, error)
LoginAbort(context.Context, *LoginAbortRequest) (*emptypb.Empty, error)
FidoAssertionAbort(context.Context, *LoginAbortRequest) (*emptypb.Empty, error)
// update
CheckUpdate(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
InstallUpdate(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
@ -829,16 +914,19 @@ type BridgeServer interface {
InstallTLSCertificate(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
ExportTLSCertificates(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
// Server -> Client event stream
RunEventStream(*EventStreamRequest, Bridge_RunEventStreamServer) error
RunEventStream(*EventStreamRequest, grpc.ServerStreamingServer[StreamEvent]) error
StopEventStream(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
// Repair
TriggerRepair(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
mustEmbedUnimplementedBridgeServer()
}
// UnimplementedBridgeServer must be embedded to have forward compatible implementations.
type UnimplementedBridgeServer struct {
}
// UnimplementedBridgeServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedBridgeServer struct{}
func (UnimplementedBridgeServer) CheckTokens(context.Context, *wrapperspb.StringValue) (*wrapperspb.StringValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckTokens not implemented")
@ -933,12 +1021,18 @@ func (UnimplementedBridgeServer) Login(context.Context, *LoginRequest) (*emptypb
func (UnimplementedBridgeServer) Login2FA(context.Context, *LoginRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Login2FA not implemented")
}
func (UnimplementedBridgeServer) LoginFido(context.Context, *LoginRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoginFido not implemented")
}
func (UnimplementedBridgeServer) Login2Passwords(context.Context, *LoginRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Login2Passwords not implemented")
}
func (UnimplementedBridgeServer) LoginAbort(context.Context, *LoginAbortRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoginAbort not implemented")
}
func (UnimplementedBridgeServer) FidoAssertionAbort(context.Context, *LoginAbortRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method FidoAssertionAbort not implemented")
}
func (UnimplementedBridgeServer) CheckUpdate(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckUpdate not implemented")
}
@ -1014,7 +1108,7 @@ func (UnimplementedBridgeServer) InstallTLSCertificate(context.Context, *emptypb
func (UnimplementedBridgeServer) ExportTLSCertificates(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ExportTLSCertificates not implemented")
}
func (UnimplementedBridgeServer) RunEventStream(*EventStreamRequest, Bridge_RunEventStreamServer) error {
func (UnimplementedBridgeServer) RunEventStream(*EventStreamRequest, grpc.ServerStreamingServer[StreamEvent]) error {
return status.Errorf(codes.Unimplemented, "method RunEventStream not implemented")
}
func (UnimplementedBridgeServer) StopEventStream(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
@ -1024,6 +1118,7 @@ func (UnimplementedBridgeServer) TriggerRepair(context.Context, *emptypb.Empty)
return nil, status.Errorf(codes.Unimplemented, "method TriggerRepair not implemented")
}
func (UnimplementedBridgeServer) mustEmbedUnimplementedBridgeServer() {}
func (UnimplementedBridgeServer) testEmbeddedByValue() {}
// UnsafeBridgeServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BridgeServer will
@ -1033,6 +1128,13 @@ type UnsafeBridgeServer interface {
}
func RegisterBridgeServer(s grpc.ServiceRegistrar, srv BridgeServer) {
// If the following call pancis, it indicates UnimplementedBridgeServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Bridge_ServiceDesc, srv)
}
@ -1594,6 +1696,24 @@ func _Bridge_Login2FA_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
func _Bridge_LoginFido_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BridgeServer).LoginFido(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Bridge_LoginFido_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BridgeServer).LoginFido(ctx, req.(*LoginRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Bridge_Login2Passwords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginRequest)
if err := dec(in); err != nil {
@ -1630,6 +1750,24 @@ func _Bridge_LoginAbort_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
func _Bridge_FidoAssertionAbort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginAbortRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BridgeServer).FidoAssertionAbort(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Bridge_FidoAssertionAbort_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BridgeServer).FidoAssertionAbort(ctx, req.(*LoginAbortRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Bridge_CheckUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
@ -2085,21 +2223,11 @@ func _Bridge_RunEventStream_Handler(srv interface{}, stream grpc.ServerStream) e
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(BridgeServer).RunEventStream(m, &bridgeRunEventStreamServer{stream})
return srv.(BridgeServer).RunEventStream(m, &grpc.GenericServerStream[EventStreamRequest, StreamEvent]{ServerStream: stream})
}
type Bridge_RunEventStreamServer interface {
Send(*StreamEvent) error
grpc.ServerStream
}
type bridgeRunEventStreamServer struct {
grpc.ServerStream
}
func (x *bridgeRunEventStreamServer) Send(m *StreamEvent) error {
return x.ServerStream.SendMsg(m)
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Bridge_RunEventStreamServer = grpc.ServerStreamingServer[StreamEvent]
func _Bridge_StopEventStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
@ -2268,6 +2396,10 @@ var Bridge_ServiceDesc = grpc.ServiceDesc{
MethodName: "Login2FA",
Handler: _Bridge_Login2FA_Handler,
},
{
MethodName: "LoginFido",
Handler: _Bridge_LoginFido_Handler,
},
{
MethodName: "Login2Passwords",
Handler: _Bridge_Login2Passwords_Handler,
@ -2276,6 +2408,10 @@ var Bridge_ServiceDesc = grpc.ServiceDesc{
MethodName: "LoginAbort",
Handler: _Bridge_LoginAbort_Handler,
},
{
MethodName: "FidoAssertionAbort",
Handler: _Bridge_FidoAssertionAbort_Handler,
},
{
MethodName: "CheckUpdate",
Handler: _Bridge_CheckUpdate_Handler,

View File

@ -89,6 +89,26 @@ func NewLoginTfaRequestedEvent(username string) *StreamEvent {
return loginEvent(&LoginEvent{Event: &LoginEvent_TfaRequested{TfaRequested: &LoginTfaRequestedEvent{Username: username}}})
}
func NewLoginFidoRequestedEvent(username string) *StreamEvent {
return loginEvent(&LoginEvent{Event: &LoginEvent_FidoRequested{FidoRequested: &LoginFidoRequestedEvent{Username: username}}})
}
func NewLoginTfaOrFidoRequestedEvent(username string) *StreamEvent {
return loginEvent(&LoginEvent{Event: &LoginEvent_TfaOrFidoRequested{TfaOrFidoRequested: &LoginTfaOrFidoRequestedEvent{Username: username}}})
}
func NewLoginFidoTouchRequested(username string) *StreamEvent {
return loginEvent(&LoginEvent{Event: &LoginEvent_LoginFidoTouchRequested{LoginFidoTouchRequested: &LoginFidoTouchEvent{Username: username}}})
}
func NewLoginFidoTouchCompleted(username string) *StreamEvent {
return loginEvent(&LoginEvent{Event: &LoginEvent_LoginFidoTouchCompleted{LoginFidoTouchCompleted: &LoginFidoTouchEvent{Username: username}}})
}
func NewLoginFidoPinRequired(username string) *StreamEvent {
return loginEvent(&LoginEvent{Event: &LoginEvent_LoginFidoPinRequired{LoginFidoPinRequired: &LoginFidoPinRequired{Username: username}}})
}
func NewLoginTwoPasswordsRequestedEvent(username string) *StreamEvent {
return loginEvent(&LoginEvent{Event: &LoginEvent_TwoPasswordRequested{TwoPasswordRequested: &LoginTwoPasswordsRequestedEvent{Username: username}}})
}

View File

@ -0,0 +1,111 @@
// Copyright (c) 2025 Proton AG
//
// This file is part of Proton Mail Bridge.
//
// Proton Mail Bridge is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Proton Mail Bridge is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
//go:build linux || darwin
package grpc
import (
"context"
"errors"
"fmt"
"github.com/ProtonMail/gluon/async"
"github.com/ProtonMail/proton-bridge/v3/internal/fido"
"github.com/keys-pub/go-libfido2"
"google.golang.org/protobuf/types/known/emptypb"
)
func (s *Service) LoginFido(_ context.Context, login *LoginRequest) (*emptypb.Empty, error) {
s.log.WithField("username", login.Username).Debug("LoginFido")
go func() {
defer async.HandlePanic(s.panicHandler)
fidoCtx, cancelFido := context.WithCancel(context.Background())
s.fidoManager.SetCancel(cancelFido)
defer s.fidoManager.Clear()
if s.auth.UID == "" || s.authClient == nil {
s.log.Errorf("Login FIDO: authentication incomplete %s %p", s.auth.UID, s.authClient)
_ = s.SendEvent(NewLoginError(LoginErrorType_FIDO_ERROR, "Missing authentication, try again."))
s.loginClean()
return
}
pinSupported, err := fido.IsPinSupported()
if err != nil {
s.log.WithError(err).Warn("could not determine security key PIN requirements")
_ = s.SendEvent(NewLoginError(LoginErrorType_FIDO_ERROR, fmt.Sprintf("Could not obtain security key pin requirements: %s", err)))
s.loginClean()
return
}
if pinSupported && len(login.Password) == 0 {
_ = s.SendEvent(NewLoginFidoPinRequired(login.Username))
return
}
pin, err := base64Decode(login.Password)
if err != nil {
s.log.WithError(err).Error("cannot decode security key device pin")
_ = s.SendEvent(NewLoginError(LoginErrorType_FIDO_PIN_INVALID, "Could not decode security key PIN"))
return
}
touchCh := make(chan struct{})
touchConfirmCh := make(chan struct{})
defer func() {
close(touchCh)
close(touchConfirmCh)
}()
go func() {
if _, ok := <-touchCh; ok {
_ = s.SendEvent(NewLoginFidoTouchRequested(login.Username))
if _, ok := <-touchConfirmCh; ok {
_ = s.SendEvent(NewLoginFidoTouchCompleted(login.Username))
}
}
}()
if err := fido.AuthWithHardwareKeyGUI(fidoCtx, s.authClient, s.auth, touchCh, touchConfirmCh, string(pin)); err != nil {
s.log.WithError(err).Warn("Login FIDO: failed")
switch {
case errors.Is(err, libfido2.ErrPinAuthBlocked):
_ = s.SendEvent(NewLoginError(LoginErrorType_FIDO_PIN_BLOCKED, "Security key PIN code is blocked"))
case errors.Is(err, libfido2.ErrPinInvalid):
_ = s.SendEvent(NewLoginError(LoginErrorType_FIDO_PIN_INVALID, "Security key PIN code is incorrect"))
case errors.Is(err, fido.ErrAssertionCancelled): // User cancellation, they can click re-auth again.
return
default:
_ = s.SendEvent(NewLoginError(LoginErrorType_FIDO_ERROR, fmt.Sprintf("Security key authentication failed: %s", err)))
s.loginClean()
}
return
}
s.finishLogin()
}()
return &emptypb.Empty{}, nil
}

View File

@ -0,0 +1,55 @@
// Copyright (c) 2025 Proton AG
//
// This file is part of Proton Mail Bridge.
//
// Proton Mail Bridge is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Proton Mail Bridge is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
package fido
import (
"context"
"sync"
)
type Manager struct {
mu sync.Mutex
cancel context.CancelFunc
}
func (fm *Manager) withLock(fn func()) {
fm.mu.Lock()
defer fm.mu.Unlock()
fn()
}
func (fm *Manager) SetCancel(cancel context.CancelFunc) {
fm.withLock(func() {
fm.cancel = cancel
})
}
func (fm *Manager) Cancel() {
fm.withLock(func() {
if fm.cancel != nil {
fm.cancel()
fm.cancel = nil
}
})
}
func (fm *Manager) Clear() {
fm.withLock(func() {
fm.cancel = nil
})
}

View File

@ -0,0 +1,53 @@
// Copyright (c) 2025 Proton AG
//
// This file is part of Proton Mail Bridge.
//
// Proton Mail Bridge is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Proton Mail Bridge is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
//go:build windows
package grpc
import (
"context"
"fmt"
"github.com/ProtonMail/gluon/async"
"github.com/ProtonMail/proton-bridge/v3/internal/fido"
"google.golang.org/protobuf/types/known/emptypb"
)
func (s *Service) LoginFido(_ context.Context, login *LoginRequest) (*emptypb.Empty, error) {
s.log.WithField("username", login.Username).Debug("LoginFido")
go func() {
defer async.HandlePanic(s.panicHandler)
if s.auth.UID == "" || s.authClient == nil {
s.log.Errorf("Login FIDO: authentication incomplete %s %p", s.auth.UID, s.authClient)
_ = s.SendEvent(NewLoginError(LoginErrorType_TFA_ABORT, "Missing authentication, try again."))
s.loginClean()
return
}
if err := fido.AuthWithHardwareKeyGUI(s.authClient, s.auth, false); err != nil {
_ = s.SendEvent(NewLoginError(LoginErrorType_FIDO_ERROR, fmt.Sprintf("Security key authentication failed: %s", err)))
s.loginClean()
return
}
s.finishLogin()
}()
return &emptypb.Empty{}, nil
}

View File

@ -38,6 +38,7 @@ import (
"github.com/ProtonMail/proton-bridge/v3/internal/bridge"
"github.com/ProtonMail/proton-bridge/v3/internal/certs"
"github.com/ProtonMail/proton-bridge/v3/internal/events"
"github.com/ProtonMail/proton-bridge/v3/internal/frontend/grpc/fido"
"github.com/ProtonMail/proton-bridge/v3/internal/hv"
"github.com/ProtonMail/proton-bridge/v3/internal/platform"
"github.com/ProtonMail/proton-bridge/v3/internal/safe"
@ -102,6 +103,8 @@ type Service struct { // nolint:structcheck
hvDetails *proton.APIHVDetails
useHvDetails bool
fidoManager *fido.Manager
}
// NewService returns a new instance of the service.
@ -187,6 +190,8 @@ func NewService(
parentPID: parentPID,
parentPIDDoneCh: make(chan struct{}),
showOnStartup: showOnStartup,
fidoManager: &fido.Manager{},
}
// Initializing.Done is only called sync.Once. Please keep the increment set to 1

View File

@ -35,6 +35,7 @@ import (
"github.com/ProtonMail/proton-bridge/v3/internal/platform"
"github.com/ProtonMail/proton-bridge/v3/internal/safe"
"github.com/ProtonMail/proton-bridge/v3/internal/service"
"github.com/ProtonMail/proton-bridge/v3/internal/unleash"
"github.com/ProtonMail/proton-bridge/v3/internal/updater"
"github.com/ProtonMail/proton-bridge/v3/pkg/ports"
"github.com/sirupsen/logrus"
@ -500,10 +501,27 @@ func (s *Service) Login(_ context.Context, login *LoginRequest) (*emptypb.Empty,
s.authClient = client
s.auth = auth
u2fLoginEnabled := s.bridge.GetFeatureFlagValue(unleash.InboxBridgeU2FLoginEnabled)
switch {
case auth.TwoFA.Enabled&proton.HasTOTP != 0:
case auth.TwoFA.Enabled == proton.HasTOTP:
_ = s.SendEvent(NewLoginTfaRequestedEvent(login.Username))
case auth.TwoFA.Enabled == proton.HasFIDO2:
if !u2fLoginEnabled {
// Such a case may only occur to internal users.
_ = s.SendEvent(NewLoginError(LoginErrorType_FIDO_ERROR, "Security key authentication required but not enabled in server configuration."))
return
}
_ = s.SendEvent(NewLoginFidoRequestedEvent(login.Username))
case auth.TwoFA.Enabled == proton.HasFIDO2AndTOTP:
if u2fLoginEnabled {
_ = s.SendEvent(NewLoginTfaOrFidoRequestedEvent(login.Username))
} else {
_ = s.SendEvent(NewLoginTfaRequestedEvent(login.Username))
}
case auth.PasswordMode == proton.TwoPasswordMode:
_ = s.SendEvent(NewLoginTwoPasswordsRequestedEvent(login.Username))
@ -582,6 +600,17 @@ func (s *Service) Login2Passwords(_ context.Context, login *LoginRequest) (*empt
return &emptypb.Empty{}, nil
}
func (s *Service) FidoAssertionAbort(_ context.Context, loginAbort *LoginAbortRequest) (*emptypb.Empty, error) {
s.log.WithField("username", loginAbort.Username).Debug("FidoAssertionAbort")
go func() {
defer async.HandlePanic(s.panicHandler)
s.fidoManager.Cancel()
}()
return &emptypb.Empty{}, nil
}
func (s *Service) LoginAbort(_ context.Context, loginAbort *LoginAbortRequest) (*emptypb.Empty, error) {
s.log.WithField("username", loginAbort.Username).Debug("LoginAbort")