mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
BasicAuthOption struct {
|
||||
BasicAuthOptions struct {
|
||||
}
|
||||
|
||||
BasicAuthFunc func(string, string) bool
|
||||
@ -22,7 +22,7 @@ const (
|
||||
//
|
||||
// For valid credentials it calls the next handler.
|
||||
// For invalid credentials, it sends "401 - Unauthorized" response.
|
||||
func BasicAuth(fn BasicAuthFunc, option ...*BasicAuthOption) echo.MiddlewareFunc {
|
||||
func BasicAuth(fn BasicAuthFunc, options ...*BasicAuthOptions) echo.MiddlewareFunc {
|
||||
return func(h echo.Handler) echo.Handler {
|
||||
return echo.HandlerFunc(func(c echo.Context) error {
|
||||
// Skip WebSocket
|
||||
|
Reference in New Issue
Block a user