Documentation
¶
Index ¶
- Constants
- Variables
- type CFeature
- func (f *CFeature) AddBypassCIDR(cidr ...string) MakeFeature
- func (f *CFeature) AddBypassIP(ip ...string) MakeFeature
- func (f *CFeature) AddUserbase(usersProvider, groupsProvider, secretsProvider string) MakeFeature
- func (f *CFeature) AuthenticateRequest(w http.ResponseWriter, r *http.Request) (handled bool, modified *http.Request)
- func (f *CFeature) Build(b feature.Buildable) (err error)
- func (f *CFeature) Ignore(patterns ...string) MakeFeature
- func (f *CFeature) Init(this interface{})
- func (f *CFeature) Make() Feature
- func (f *CFeature) Protect(pattern, group string) MakeFeature
- func (f *CFeature) ProtectAll(group string) MakeFeature
- func (f *CFeature) RestrictServeData(data []byte, mime string, w http.ResponseWriter, r *http.Request) (modReq *http.Request, allow bool)
- func (f *CFeature) RestrictServePage(pgCtx beContext.Context, w http.ResponseWriter, r *http.Request) (modCtx beContext.Context, modReq *http.Request, allow bool)
- func (f *CFeature) SetAuthCacheControl(control string) MakeFeature
- func (f *CFeature) SetLogoutPath(path string) MakeFeature
- func (f *CFeature) SetLogoutRedirectPath(path string) MakeFeature
- func (f *CFeature) SetRealm(realm string) MakeFeature
- func (f *CFeature) Setup(enjin feature.Internals)
- func (f *CFeature) Shutdown()
- func (f *CFeature) Startup(ctx *cli.Context) (err error)
- type Feature
- type MakeFeature
Constants ¶
View Source
const ( Tag feature.Tag = "user-auth-basic" UserContextKey = beContext.RequestKey("user-auth-basic-user-key") )
Variables ¶
View Source
var LogoutRedirectContentType = "text/html"
View Source
var LogoutRedirectResponseFormat = `` /* 138-byte string literal not displayed */
View Source
var UnauthContentType = "text/plain"
View Source
var UnauthResponse = "401 - " + http.StatusText(http.StatusUnauthorized)
Functions ¶
This section is empty.
Types ¶
type CFeature ¶
func (*CFeature) AddBypassCIDR ¶ added in v0.1.2
func (f *CFeature) AddBypassCIDR(cidr ...string) MakeFeature
func (*CFeature) AddBypassIP ¶
func (f *CFeature) AddBypassIP(ip ...string) MakeFeature
func (*CFeature) AddUserbase ¶
func (f *CFeature) AddUserbase(usersProvider, groupsProvider, secretsProvider string) MakeFeature
func (*CFeature) AuthenticateRequest ¶
func (*CFeature) Ignore ¶
func (f *CFeature) Ignore(patterns ...string) MakeFeature
func (*CFeature) Protect ¶
func (f *CFeature) Protect(pattern, group string) MakeFeature
func (*CFeature) ProtectAll ¶
func (f *CFeature) ProtectAll(group string) MakeFeature
func (*CFeature) RestrictServeData ¶
func (*CFeature) RestrictServePage ¶
func (*CFeature) SetAuthCacheControl ¶
func (f *CFeature) SetAuthCacheControl(control string) MakeFeature
func (*CFeature) SetLogoutPath ¶
func (f *CFeature) SetLogoutPath(path string) MakeFeature
func (*CFeature) SetLogoutRedirectPath ¶
func (f *CFeature) SetLogoutRedirectPath(path string) MakeFeature
func (*CFeature) SetRealm ¶
func (f *CFeature) SetRealm(realm string) MakeFeature
type Feature ¶
type Feature interface { feature.Feature userbase.AuthProvider feature.PageRestrictionHandler feature.DataRestrictionHandler }
type MakeFeature ¶
type MakeFeature interface { Make() Feature SetRealm(realm string) MakeFeature SetLogoutPath(path string) MakeFeature SetLogoutRedirectPath(path string) MakeFeature SetAuthCacheControl(control string) MakeFeature AddUserbase(usersProvider, groupsProvider, secretsProvider string) MakeFeature Ignore(patterns ...string) MakeFeature Protect(pattern, group string) MakeFeature ProtectAll(group string) MakeFeature AddBypassIP(ip ...string) MakeFeature AddBypassCIDR(cidr ...string) MakeFeature }
func New ¶
func New() MakeFeature
func NewTagged ¶
func NewTagged(tag feature.Tag) MakeFeature
Click to show internal directories.
Click to hide internal directories.