Documentation ¶
Index ¶
- func ClientContext(next http.Handler) http.Handler
- func OptionDB(db db.DB) func(*Handler) error
- func OptionGeoResolver(geo geo.Resolver) func(*Handler) error
- func OptionHTTPPort(port int) func(*Handler) error
- func OptionIPAddress(ipAddress string) func(*Handler) error
- func OptionKV(kv store.Manager) func(*Handler) error
- func OptionParams(key, value string) func(*Handler) error
- func OptionTLS(certFile, keyFile string) func(*Handler) error
- type AdminHandler
- type AuthHandler
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientContext ¶
ClientContext is http middleware that adds a request's ip address and user agent to the context.
func OptionGeoResolver ¶
OptionGeoResolver applies a geo resolver option.
func OptionHTTPPort ¶
OptionHTTPPort applies a TCP port option, used by the http handler.
func OptionIPAddress ¶
OptionIPAddress applies a IP address option.
func OptionParams ¶
OptionParams applies a name,value option, more than one can be added.
Types ¶
type AdminHandler ¶
type AdminHandler struct { Handler // contains filtered or unexported fields }
AdminHandler implements the Admin REST API.
func NewAdminHandler ¶
NewAdminHandler creates a new Admin API endpoint.
type AuthHandler ¶
type AuthHandler struct { Handler // contains filtered or unexported fields }
AuthHandler implements the Auth REST API.
func NewAuthHandler ¶
NewAuthHandler creates a new Auth API endpoint.
func (*AuthHandler) Init ¶
func (handler *AuthHandler) Init()
Init sets up the Dogpark HTTP handlers for FIDO registration and authorization. Note that there is no first factor authn/z employed here.
Suggestions: - restrict the `cors_allowed_origins` to your webapp in which first factor authn is occurring - add your own authz middleware that checks authn header for valid session (and add to client)