Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthorizePath = "/authorize" TokenPath = "/token" ReadTimeout = 5 * time.Second WriteTimeout = 5 * time.Minute )
View Source
const RefreshTokenLength = 32
Variables ¶
View Source
var ErrNilCredentials = errors.New("nil credentials")
Functions ¶
This section is empty.
Types ¶
type AccessGenerator ¶
type AccessGenerator struct {
// contains filtered or unexported fields
}
type Credentials ¶
type InvalidOptionError ¶
func (*InvalidOptionError) Apply ¶
func (e *InvalidOptionError) Apply(interface{}) error
func (*InvalidOptionError) Error ¶
func (e *InvalidOptionError) Error() string
func (*InvalidOptionError) Unwrap ¶
func (e *InvalidOptionError) Unwrap() error
type LoginMethod ¶
type LoginMethodFunc ¶
type OptionFunc ¶
type OptionFunc func(instance interface{}) error
func (OptionFunc) Apply ¶
func (f OptionFunc) Apply(instance interface{}) error
type RequiredFieldError ¶
type RequiredFieldError struct {
Field string
}
func (*RequiredFieldError) Error ¶
func (e *RequiredFieldError) Error() string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a local web server for collecting auth.
func NewServer ¶
func NewServer( setter digiconfig.Setter, clientID, clientSecret, redirectURL string, loginMethod LoginMethod, logger *log.Logger, ) (*Server, error)
StartServer starts a local webserver to receive the auth.
func (*Server) AuthorizeURL ¶
AuthorizeURL returns the URL to the authorize endpoint.
Click to show internal directories.
Click to hide internal directories.