Documentation ¶
Overview ¶
Package authmgr provides simple interface for Google oauth2 authentication for console applications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is authorization manager
func NewFromEnv ¶
NewFromEnv creates manager from environment variables.
func NewFromGoogleCreds ¶
NewFromGoogleCreds creates manager from a credentials file
type Option ¶
Option sets option variables.
func OptListenerAddr ¶
OptListenerAddr sets the template directory for templates.
func OptResetAuth ¶
func OptResetAuth() Option
OptResetAuth resets the token and forces reauthentication.
func OptTemplateDir ¶
OptTemplateDir sets the template directory for templates (and loads the templates).
func OptTryWebAuth ¶
OptTryWebAuth sets the flag to attempt to present user with browser for authentication. Otherwise - console login is used.
func OptUseIndexPage ¶
OptUseIndexPage sets the optional index page display prior to redirecting to Oauth provider scopes permission page.