auth

package
v0.0.0-...-831e56b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAuthTypes = []Type{
	&None{},
	&VNCAuth{},
	&TightSecurity{},
}

DefaultAuthTypes is the default enabled list of auth types.

View Source
var TightAuthCapabilities = []types.TightCapability{
	{Code: 1, Vendor: "STDV", Signature: "NOAUTH__"},
	{Code: 2, Vendor: "STDV", Signature: "VNCAUTH_"},
}

TightAuthCapabilities represents TightSecurity auth capabilities.

View Source
var TightClientMessages = []types.TightCapability{}

TightClientMessages represents supported tight client messages.

View Source
var TightEncodingCapabilities = []types.TightCapability{
	{Code: 0, Vendor: "STDV", Signature: "RAW_____"},
	{Code: 1, Vendor: "STDV", Signature: "COPYRECT"},
	{Code: 7, Vendor: "TGHT", Signature: "TIGHT___"},
}

TightEncodingCapabilities represents TightSecurity encoding capabilities.

View Source
var TightServerMessages = []types.TightCapability{}

TightServerMessages represents supported tight server messages.

View Source
var TightTunnelCapabilities = []types.TightCapability{
	{Code: 0, Vendor: "TGHT", Signature: "NOTUNNEL"},
}

TightTunnelCapabilities represents TightSecurity tunnel capabilities.

Functions

This section is empty.

Types

type None

type None struct{}

None represents no authentication.

func (*None) Code

func (a *None) Code() uint8

Code returns the code for no-auth.

func (*None) Negotiate

func (a *None) Negotiate(rw *buffer.ReadWriter) error

Negotiate immediately returns nil.

type TightSecurity

type TightSecurity struct {
	AuthGetter func(code uint8) Type
}

TightSecurity implements Tight security. https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#tight-security-type

func (*TightSecurity) Code

func (t *TightSecurity) Code() uint8

Code returns the code.

func (*TightSecurity) ExtendServerInit

func (t *TightSecurity) ExtendServerInit(buf io.Writer)

ExtendServerInit signals to the rfb server that we extend the ServerInit message.

func (*TightSecurity) Negotiate

func (t *TightSecurity) Negotiate(rw *buffer.ReadWriter) error

Negotiate will negotiate tight security.

type Type

type Type interface {
	Code() uint8
	Negotiate(wr *buffer.ReadWriter) error
}

Type represents an authentication type.

func GetDefaults

func GetDefaults() []Type

GetDefaults returns a slice of the default auth handlers.

type VNCAuth

type VNCAuth struct {
	Password string
}

VNCAuth represents VNCAuthentication.

func (*VNCAuth) Code

func (a *VNCAuth) Code() uint8

Code returns the code for vnc uth.

func (*VNCAuth) Negotiate

func (a *VNCAuth) Negotiate(rw *buffer.ReadWriter) error

Negotiate immediately returns nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL