mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-15 21:48:03 +00:00
20 lines
387 B
Go
20 lines
387 B
Go
package auth
|
|
|
|
import "net/http"
|
|
|
|
// Method an interface describing an authentication method
|
|
type Method interface {
|
|
Init(debug bool)
|
|
Usage() string
|
|
ParseParam(string) error
|
|
Middleware() func(http.Handler) http.Handler
|
|
}
|
|
|
|
var (
|
|
// AvailableMethods Returns a map of available auth methods
|
|
AvailableMethods = map[string]Method{
|
|
"none": new(noAuth),
|
|
"basic": new(basicAuth),
|
|
}
|
|
)
|