mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-18 01:24:19 +01:00
Initial version of the proxy.
Missing: logging, an Authenticator implementing the LSAT HTTP and gRPC protocol.
This commit is contained in:
15
auth/interface.go
Normal file
15
auth/interface.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user