webcookie

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractNamedCookie

func ExtractNamedCookie(cookieHeader string, targetName string) string

ExtractSessionCookie retrieves a specific named cookie from a header string or session string.

func IsWebCookieProvider

func IsWebCookieProvider(provider string) bool

IsWebCookieProvider reports whether the provider uses cookie/session authentication.

func ParseJsonCookiesToHeader

func ParseJsonCookiesToHeader(raw string) (string, error)

ParseJsonCookiesToHeader converts raw JSON cookie export into standard "Cookie: name=val; name2=val2" header.

func StripCookieInputPrefix

func StripCookieInputPrefix(raw string) string

StripCookieInputPrefix trims leading Bearer or Cookie: labels from user input.

func WebSessionCredentialKey

func WebSessionCredentialKey(psd map[string]interface{}) string

WebSessionCredentialKey extracts a comparable secret token from providerSpecificData.

Types

type RawCookie

type RawCookie struct {
	Name     string `json:"name"`
	Value    string `json:"value"`
	Domain   string `json:"domain,omitempty"`
	Path     string `json:"path,omitempty"`
	Expires  any    `json:"expires,omitempty"`
	HttpOnly bool   `json:"httpOnly,omitempty"`
	Secure   bool   `json:"secure,omitempty"`
	SameSite string `json:"sameSite,omitempty"`
}

RawCookie represents a cookie entry exported by standard DevTools or browser extensions.

Jump to

Keyboard shortcuts

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