1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 21:15:56 +00:00

New Context.SetLogoutFunc/Logout and SetFunc/CallFunc methods

Read HISTORY.md
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-10-12 02:07:04 +03:00
parent 2d62d49fdb
commit f6905a3f79
13 changed files with 576 additions and 8 deletions

View File

@@ -42,11 +42,14 @@ type Config struct {
//
// Defaults to nil.
OnAsk context.Handler
// DisableLogoutFunc disables the registration of the custom basicauth Context.Logout.
DisableLogoutFunc bool
}
// DefaultConfig returns the default configs for the BasicAuth middleware
func DefaultConfig() Config {
return Config{make(map[string]string), DefaultBasicAuthRealm, 0, nil}
return Config{make(map[string]string), DefaultBasicAuthRealm, 0, nil, false}
}
// User returns the user from context key same as ctx.Request().BasicAuth().