Files
aperture/auth/interface.go
Valentine Wallace 279fa2a64b Initial version of the proxy.
Missing: logging, an Authenticator implementing the LSAT HTTP
and gRPC protocol.
2019-09-12 16:41:25 -07:00

16 lines
474 B
Go

package auth
import "net/http"
// Authenticator is the generic interface for validating client headers and
// returning new challenge headers.
type Authenticator interface {
// Accept returns whether or not the header successfully authenticates the user
// to a given backend service.
Accept(*http.Header) bool
// FreshChallengeHeader returns a header containing a challenge for the user to
// complete.
FreshChallengeHeader(r *http.Request) (http.Header, error)
}