Documentation
¶
Index ¶
- func ClearSessionCookies(w http.ResponseWriter, r *http.Request, cookieName string, ...)
- func CompressToken(token string) (string, error)
- func DecompressToken(compressed string) (string, error)
- func DecryptToken(encrypted string, key []byte) (string, error)
- func DeriveKey(keyString string, sz int) ([]byte, error)
- func EncryptToken(token string, key []byte) (string, error)
- func FilterSessionCookies(cookies []*http.Cookie, cookieName string) []*http.Cookie
- func GetRefreshedService(svcName string, ctx ziti.Context) (*rest_model.ServiceDetail, bool)
- func GetSessionCookie(r *http.Request, cookieName string) (*http.Cookie, error)
- func JoinURLPath(a, b *url.URL) (path, rawpath string)
- func NewZrokListener(_ context.Context, _ string, addr string, _ string, _ uint, _ net.ListenConfig) (any, error)
- func SetSessionCookie(w http.ResponseWriter, cookieName string, tokenValue string, ...) error
- func TXer(from, to net.Conn)
- type OAuthCookieConfig
- type Request
- type TlsConfig
- type ZrokListener
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
CompressToken compresses a token string using gzip and returns base64-encoded result
func DecompressToken ¶ added in v1.1.9
DecompressToken decompresses a base64-encoded, gzip-compressed token string
func DecryptToken ¶ added in v1.1.9
DecryptToken decrypts an encrypted token using AES-GCM (256)
func DeriveKey ¶ added in v1.1.9
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
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
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
GetSessionCookie retrieves and reassembles a session cookie that may be striped across multiple cookies
func JoinURLPath ¶
func NewZrokListener ¶ added in v0.4.6
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
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 ZrokListener ¶ added in v0.4.6
type ZrokListener struct {
// contains filtered or unexported fields
}
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