Initial version of the proxy.

Missing: logging, an Authenticator implementing the LSAT HTTP
and gRPC protocol.
This commit is contained in:
Valentine Wallace
2019-06-29 22:48:42 -07:00
parent e32095f2a7
commit 279fa2a64b
12 changed files with 497 additions and 0 deletions

15
auth/interface.go Normal file
View File

@@ -0,0 +1,15 @@
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)
}