mirror of
https://github.com/labstack/echo.git
synced 2025-07-05 00:58:47 +02:00
@ -17,7 +17,8 @@ type (
|
|||||||
// Required.
|
// Required.
|
||||||
Validator BasicAuthValidator
|
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
|
Realm string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var realm string
|
realm := ""
|
||||||
if config.Realm == defaultRealm {
|
if config.Realm == defaultRealm {
|
||||||
realm = defaultRealm
|
realm = defaultRealm
|
||||||
} else {
|
} else {
|
||||||
|
@ -41,6 +41,10 @@ BasicAuthConfig struct {
|
|||||||
// Validator is a function to validate BasicAuth credentials.
|
// Validator is a function to validate BasicAuth credentials.
|
||||||
// Required.
|
// Required.
|
||||||
Validator BasicAuthValidator
|
Validator BasicAuthValidator
|
||||||
|
|
||||||
|
// Realm is a string to define realm attribute of BasicAuth.
|
||||||
|
// Default value "Restricted".
|
||||||
|
Realm string
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user