Versions in this module Expand all Collapse all v1 v1.0.0 Feb 1, 2026 Changes in this version + type APIKeyAuth struct + func NewAPIKeyAuth(headers map[string]string) *APIKeyAuth + func (a *APIKeyAuth) Authenticate(ctx context.Context, pool *browser.Pool) error + func (a *APIKeyAuth) GetCookies() []*http.Cookie + func (a *APIKeyAuth) GetHeaders() map[string]string + func (a *APIKeyAuth) IsAuthenticated() bool + func (a *APIKeyAuth) RefreshIfNeeded(ctx context.Context) error + func (a *APIKeyAuth) Type() AuthType + type AuthType string + const AuthTypeAPIKey + const AuthTypeBasic + const AuthTypeFormLogin + const AuthTypeJWT + const AuthTypeNone + const AuthTypeOAuth + const AuthTypeSession + type BasicAuth struct + func NewBasicAuth(username, password string) *BasicAuth + func (b *BasicAuth) Authenticate(ctx context.Context, pool *browser.Pool) error + func (b *BasicAuth) GetCookies() []*http.Cookie + func (b *BasicAuth) GetHeaders() map[string]string + func (b *BasicAuth) IsAuthenticated() bool + func (b *BasicAuth) RefreshIfNeeded(ctx context.Context) error + func (b *BasicAuth) Type() AuthType + type Credentials struct + Cookies []*http.Cookie + FormFields map[string]string + Headers map[string]string + LoginURL string + OAuthConfig *OAuthConfig + Password string + Token string + Type AuthType + Username string + type FormLoginAuth struct + func NewFormLoginAuth(creds Credentials) *FormLoginAuth + func (f *FormLoginAuth) Authenticate(ctx context.Context, pool *browser.Pool) error + func (f *FormLoginAuth) GetCookies() []*http.Cookie + func (f *FormLoginAuth) GetHeaders() map[string]string + func (f *FormLoginAuth) IsAuthenticated() bool + func (f *FormLoginAuth) RefreshIfNeeded(ctx context.Context) error + func (f *FormLoginAuth) SetSessionLifetime(duration time.Duration) + func (f *FormLoginAuth) Type() AuthType + type JWTAuth struct + func NewJWTAuth(token string) *JWTAuth + func NewJWTAuthWithRefresh(token, refreshToken, refreshURL string) *JWTAuth + func (j *JWTAuth) Authenticate(ctx context.Context, pool *browser.Pool) error + func (j *JWTAuth) GetCookies() []*http.Cookie + func (j *JWTAuth) GetExpiry() time.Time + func (j *JWTAuth) GetHeaders() map[string]string + func (j *JWTAuth) GetToken() string + func (j *JWTAuth) IsAuthenticated() bool + func (j *JWTAuth) RefreshIfNeeded(ctx context.Context) error + func (j *JWTAuth) SetToken(token string) + func (j *JWTAuth) TimeUntilExpiry() time.Duration + func (j *JWTAuth) Type() AuthType + type NoAuth struct + func (n *NoAuth) Authenticate(ctx context.Context, pool *browser.Pool) error + func (n *NoAuth) GetCookies() []*http.Cookie + func (n *NoAuth) GetHeaders() map[string]string + func (n *NoAuth) IsAuthenticated() bool + func (n *NoAuth) RefreshIfNeeded(ctx context.Context) error + func (n *NoAuth) Type() AuthType + type OAuthAuth struct + func NewOAuthAuth(config *OAuthConfig) *OAuthAuth + func (o *OAuthAuth) Authenticate(ctx context.Context, pool *browser.Pool) error + func (o *OAuthAuth) GetCookies() []*http.Cookie + func (o *OAuthAuth) GetHeaders() map[string]string + func (o *OAuthAuth) IsAuthenticated() bool + func (o *OAuthAuth) RefreshIfNeeded(ctx context.Context) error + func (o *OAuthAuth) Type() AuthType + type OAuthConfig struct + AuthURL string + ClientID string + ClientSecret string + RedirectURL string + Scopes []string + TokenURL string + type Provider interface + Authenticate func(ctx context.Context, browserPool *browser.Pool) error + GetCookies func() []*http.Cookie + GetHeaders func() map[string]string + IsAuthenticated func() bool + RefreshIfNeeded func(ctx context.Context) error + Type func() AuthType + func NewProvider(creds Credentials) (Provider, error) + type SessionAuth struct + func NewSessionAuth(cookies []*http.Cookie) *SessionAuth + func (s *SessionAuth) AddCookie(cookie *http.Cookie) + func (s *SessionAuth) Authenticate(ctx context.Context, pool *browser.Pool) error + func (s *SessionAuth) ClearCookies() + func (s *SessionAuth) GetCookie(name string) *http.Cookie + func (s *SessionAuth) GetCookies() []*http.Cookie + func (s *SessionAuth) GetHeaders() map[string]string + func (s *SessionAuth) IsAuthenticated() bool + func (s *SessionAuth) RefreshIfNeeded(ctx context.Context) error + func (s *SessionAuth) SetCookies(cookies []*http.Cookie) + func (s *SessionAuth) Type() AuthType