webhookd/pkg/auth/authenticator.go
2023-02-13 21:17:46 +00:00

12 lines
285 B
Go

package auth
import (
"net/http"
)
// Authenticator is a generic interface to validate HTTP request credentials.
// It's returns the authentication result along with the principal (username) if it has one.
type Authenticator interface {
Validate(r *http.Request) (bool, *string)
}