endpoints

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearSessionCookies added in v1.1.9

func ClearSessionCookies(w http.ResponseWriter, r *http.Request, cookieName string, cfg OAuthCookieConfig)

ClearSessionCookies clears all session cookies including any striped chunks

func CompressToken added in v1.1.9

func CompressToken(token string) (string, error)

CompressToken compresses a token string using gzip and returns base64-encoded result

func DecompressToken added in v1.1.9

func DecompressToken(compressed string) (string, error)

DecompressToken decompresses a base64-encoded, gzip-compressed token string

func DecryptToken added in v1.1.9

func DecryptToken(encrypted string, key []byte) (string, error)

DecryptToken decrypts an encrypted token using AES-GCM (256)

func DeriveKey added in v1.1.9

func DeriveKey(keyString string, sz int) ([]byte, error)

DeriveKey uses HKDF to expand a "password" into a []byte to be used as a key; better than just a raw hash

func EncryptToken added in v1.1.9

func EncryptToken(token string, key []byte) (string, error)

EncryptToken uses AES-GCM (256) to encrypt tokens for inclusion in session tokens so that they're opaque outside of the auth subsystem

func FilterSessionCookies added in v1.1.9

func FilterSessionCookies(cookies []*http.Cookie, cookieName string) []*http.Cookie

FilterSessionCookies filters out session cookies (including striped chunks) from a cookie list

func GetRefreshedService

func GetRefreshedService(svcName string, ctx ziti.Context) (*rest_model.ServiceDetail, bool)

func GetSessionCookie added in v1.1.9

func GetSessionCookie(r *http.Request, cookieName string) (*http.Cookie, error)

GetSessionCookie retrieves and reassembles a session cookie that may be striped across multiple cookies

func JoinURLPath

func JoinURLPath(a, b *url.URL) (path, rawpath string)

func NewZrokListener added in v0.4.6

func NewZrokListener(_ context.Context, _ string, addr string, _ string, _ uint, _ net.ListenConfig) (any, error)

func SetSessionCookie added in v1.1.9

func SetSessionCookie(w http.ResponseWriter, cookieName string, tokenValue string, cfg OAuthCookieConfig) error

SetSessionCookie compresses and stripes a session cookie across multiple cookies if needed

func TXer added in v0.4.0

func TXer(from, to net.Conn)

Types

type OAuthCookieConfig added in v1.1.9

type OAuthCookieConfig interface {
	GetCookieName() string
	GetCookieDomain() string
	GetMaxCookieSize() int
	GetSessionLifetime() time.Duration
}

OAuthCookieConfig defines the interface for OAuth cookie configuration This allows different proxy types to implement their own config structs while sharing cookie utilities

type Request

type Request struct {
	Stamp      time.Time
	RemoteAddr string
	Method     string
	Path       string
}

type TlsConfig added in v0.4.23

type TlsConfig struct {
	CertPath string
	KeyPath  string
}

type ZrokListener added in v0.4.6

type ZrokListener struct {
	// contains filtered or unexported fields
}

func (*ZrokListener) Accept added in v0.4.6

func (l *ZrokListener) Accept() (net.Conn, error)

func (*ZrokListener) Addr added in v0.4.6

func (l *ZrokListener) Addr() net.Addr

func (*ZrokListener) Close added in v0.4.6

func (l *ZrokListener) Close() error

func (*ZrokListener) Network added in v0.4.6

func (l *ZrokListener) Network() string

func (*ZrokListener) String added in v0.4.6

func (l *ZrokListener) String() string

Directories

Path Synopsis
Package socks5 is a SOCKS5 server implementation.
Package socks5 is a SOCKS5 server implementation.

Jump to

Keyboard shortcuts

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