TUN-3085: Pass connection authentication information using TunnelAuth struct

This commit is contained in:
Igor Postelnik
2020-06-11 21:47:40 -05:00
committed by Adam Chalmers
parent 448a7798f7
commit 8f75feac94
5 changed files with 334 additions and 189 deletions

View File

@@ -11,12 +11,12 @@ import (
// mocks for specific unit tests without having to implement every method
type mockTunnelServerBase struct{}
func (mockTunnelServerBase) Register(ctx context.Context, auth []byte, tunnelUUID uuid.UUID, connIndex byte, options *ConnectionOptions) (*ConnectionDetails, error) {
panic("unexpected call to Register")
func (mockTunnelServerBase) RegisterConnection(ctx context.Context, auth TunnelAuth, tunnelID uuid.UUID, connIndex byte, options *ConnectionOptions) (*ConnectionDetails, error) {
panic("unexpected call to RegisterConnection")
}
func (mockTunnelServerBase) Unregister(ctx context.Context) {
panic("unexpected call to Unregister")
func (mockTunnelServerBase) UnregisterConnection(ctx context.Context) {
panic("unexpected call to UnregisterConnection")
}
func (mockTunnelServerBase) RegisterTunnel(ctx context.Context, originCert []byte, hostname string, options *RegistrationOptions) *TunnelRegistration {