Documentation
¶
Overview ¶
Package browsersession signs in with a session a browser already holds.
It exists for the sites a token cannot be got from any other way: single sign-on, two-factor, a captcha — anything where the login happens in a browser and there is no password this tool could send. The browser has already done the hard part; this turns what it holds into an ordinary web service token, once, and then no longer needs it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Method ¶
type Method struct {
// contains filtered or unexported fields
}
Method exchanges a browser session for a token.
func New ¶
New builds the method. New builds the method. readHidden reads a line from the terminal without echoing it; nil leaves the method unable to prompt, which is what a caller with no terminal wants.
func (*Method) Authenticate ¶
func (*Method) Probe ¶
func (*Method) Probe(_ context.Context, _ site.Site, config *auth.PublicConfig) auth.ProbeResult
Probe reports whether the exchange could work.
It is never chosen automatically: the caller has to hand over a session cookie, and a credential that powerful is not something to go looking for on someone's behalf.