Versions in this module Expand all Collapse all v0 v0.1.1 Nov 20, 2026 Changes in this version + type BypassCode struct + Code string + CredentialsSaved bool + Validity string + func CreateBypassCode(ctx context.Context, options Options) (*BypassCode, error) v0.1.0 Nov 12, 2026 Changes in this version + var ErrBypassRejected = errors.New("Duo rejected the bypass code") + var ErrCredentialsRequired = errors.New("USC sign-in is required") + var ErrPasswordRejected = errors.New("USC rejected the username or password") + var ErrSessionInvalid = errors.New("session expired") + var ErrSessionNotFound = errors.New("no saved session") + func ForSite(name site.Name, err error) error + func SaveCredentials(file string, credentials Credentials) error + type CookiePolicy struct + PreserveCookies []string + ResetDomains []string + type Credentials struct + BypassCode string + Password string + Username string + func LoadCredentials(file string) (Credentials, error) + func (c Credentials) Complete() bool + type Options struct + Credentials Credentials + CredentialsFile string + SessionFile string + func (o Options) ResolveCredentials() (Credentials, error) + type Session struct + func Open(ctx context.Context, name site.Name, options Options) (*Session, error) + func OpenSession(options Options, policy CookiePolicy) (*Session, error) + func (s *Session) Authenticate(ctx context.Context, target, referer string) (*http.Response, error) + func (s *Session) Do(request *http.Request) (*http.Response, error) + type SiteError struct + Err error + Site site.Name + func (e *SiteError) Error() string + func (e *SiteError) Unwrap() error + type StoredCookie struct + Cookie http.Cookie + SetBy string + func LoadStoredCookies(sessionFile string) ([]StoredCookie, error)