Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
type AuthHandler struct { Ctx context.Context ConfigDir string ListenAddr string Oauth2Config *oauth2.Config HttpClient *http.Client HttpServer *http.Server HttpMux *http.ServeMux AccessToken string AuthDoneCh chan struct{} }
func NewAuthHandler ¶
func NewAuthHandler(configDirectory string, opts OauthHandlerOptions) *AuthHandler
func (*AuthHandler) Authenticate ¶
func (h *AuthHandler) Authenticate() (string, error)
func (*AuthHandler) CallbackHandler ¶
func (h *AuthHandler) CallbackHandler(w http.ResponseWriter, r *http.Request)
func (*AuthHandler) GetAuthenticationURL ¶
func (h *AuthHandler) GetAuthenticationURL() string
func (*AuthHandler) LoadAccessToken ¶
func (h *AuthHandler) LoadAccessToken() (string, bool)
func (*AuthHandler) SaveAccessToken ¶
func (h *AuthHandler) SaveAccessToken(token string) error
type OauthHandlerOptions ¶
type OauthHandlerOptions struct { Vendor AuthVendor TenantID string ClientID string SkipTLSVerification bool }
func NewOauthHandlerOptions ¶
func NewOauthHandlerOptions(vendor AuthVendor, tenantID string, clientID string) OauthHandlerOptions
Click to show internal directories.
Click to hide internal directories.