1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-30 08:46:41 +02:00

Updated docs

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2017-02-21 15:18:09 -08:00
parent d28ea936d4
commit 6574bdf207
2 changed files with 7 additions and 2 deletions

View File

@ -17,7 +17,8 @@ type (
// Required.
Validator BasicAuthValidator
// Realm is a string to define realm attribute of BasicAuth
// Realm is a string to define realm attribute of BasicAuth.
// Default value "Restricted".
Realm string
}
@ -87,7 +88,7 @@ func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc {
}
}
var realm string
realm := ""
if config.Realm == defaultRealm {
realm = defaultRealm
} else {

View File

@ -41,6 +41,10 @@ BasicAuthConfig struct {
// Validator is a function to validate BasicAuth credentials.
// Required.
Validator BasicAuthValidator
// Realm is a string to define realm attribute of BasicAuth.
// Default value "Restricted".
Realm string
}
```