token

package
v0.0.0-...-b7331ae Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlRequest

type ControlRequest struct {
	Destination string `json:"a"`
	Password    string `json:"p,omitempty"`
}

ControlRequest contains VNC server data

type Decoder

type Decoder interface {
	Decode(string) (*ControlRequest, error)
}

Decoder decodes a token into a ControlRequest

type Encoder

type Encoder interface {
	EncodeWithExpiry(*ControlRequest, time.Time) string
}

Encoder encodes a ControlRequest into a token

func NewJWEEncoder

func NewJWEEncoder(key []byte) (Encoder, error)

type Parser

type Parser interface {
	Decoder

	ExtractControlRequest(r *http.Request) (*ControlRequest, error)
}

Parser interface extracts ControlRequest token from a http.Request

func NewJWEParser

func NewJWEParser(key []byte) (Parser, error)

NewJWEParser returns a new JWE Parser instance

func NewPlainParser

func NewPlainParser() Parser

NewPlainParser creates a plain URI parser

Jump to

Keyboard shortcuts

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