Versions in this module Expand all Collapse all v0 v0.0.2 Dec 8, 2022 Changes in this version + const SimpleProviderName + func ProviderList() []string + func RegisterProvider(desc *ProviderDescription, factoryMethod Provider) + type Backend interface + Authenticate func(username, password string) (bool, model.UserInfo, error) + func SimpleBackendFactory(config map[string]string) (Backend, error) + type Config struct + Backends Options + CookieDomain string + CookieExpiry time.Duration + CookieHTTPOnly bool + CookieName string + CookieSecure bool + GracePeriod time.Duration + Host string + JwtAlgo string + JwtExpiry time.Duration + JwtRefreshes int + JwtSecret string + JwtSecretFile string + LogLevel string + LoginPath string + LogoutURL string + Oauth Options + Port string + Redirect bool + RedirectCheckReferer bool + RedirectHostFile string + RedirectQueryParameter string + SuccessURL string + Template string + TextLogging bool + UserEndpoint string + UserEndpointTimeout time.Duration + UserEndpointToken string + UserFile string + func DefaultConfig() *Config + func ReadConfig() *Config + func (c *Config) ConfigureFlagSet(f *flag.FlagSet) + func (c *Config) ResolveFileReferences() error + type Handler struct + func NewHandler(config *Config) (*Handler, error) + func (h *Handler) GetToken(r *http.Request) (userInfo model.UserInfo, valid bool) + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Options map[string]map[string]string + type Provider func(config map[string]string) (Backend, error) + func GetProvider(providerName string) (Provider, bool) + type ProviderDescription struct + HelpText string + Name string + func GetProviderDescription(providerName string) (*ProviderDescription, bool) + type RespondAuthenticatedResponse struct + RefreshToken string + Token string + type SimpleBackend struct + func NewSimpleBackend(userPassword map[string]string) *SimpleBackend + func (sb *SimpleBackend) Authenticate(username, password string) (bool, model.UserInfo, error) + type UserClaims interface + Claims func(userInfo model.UserInfo) (jwt.Claims, error) + func NewUserClaims(config *Config) (UserClaims, error)