You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature is Enterprise only (requires BUSL).
Any access to the schematic requires the user to be authenticated
before access.
Moreover, any schematic stores the owner in the schematic, so each
schematic becomes private (owned by the user which created it).
Authentication is configured using a set of usernames and keys
associates with each user (API key).
Signed-off-by: Andrey Smirnov <[email protected]>
func (p*provider) Middleware(handlerfunc(ctx context.Context, w http.ResponseWriter, r*http.Request, p httprouter.Params) error) func(ctx context.Context, w http.ResponseWriter, r*http.Request, p httprouter.Params) error {
26
+
returnfunc(ctx context.Context, w http.ResponseWriter, r*http.Request, p httprouter.Params) error {
// Package enterprise provide glue to Enterprise code.
2
+
package enterprise
3
+
4
+
import (
5
+
"context"
6
+
"net/http"
7
+
8
+
"github.com/julienschmidt/httprouter"
9
+
)
10
+
11
+
// AuthProvider defines an authentication provider.
12
+
typeAuthProviderinterface {
13
+
Middleware(func(ctx context.Context, w http.ResponseWriter, r*http.Request, p httprouter.Params) error) func(ctx context.Context, w http.ResponseWriter, r*http.Request, p httprouter.Params) error
0 commit comments