MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / makeHandlerSpecificAuthScope

Function makeHandlerSpecificAuthScope

rest/handler.go:170–174  ·  view source on GitHub ↗

makeHandlerSpecificAuthScope creates an http.Handler that will run a handler with the given method. It also takes in a callback function which when given the endpoint payload returns an auth scope.

(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod, authScopeFunc authScopeFunc)

Source from the content-addressed store, hash-verified

168// makeHandlerSpecificAuthScope creates an http.Handler that will run a handler with the given method. It also takes in a callback function which when
169// given the endpoint payload returns an auth scope.
170func makeHandlerSpecificAuthScope(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod, authScopeFunc authScopeFunc) http.Handler {
171 return makeHandlerWithOptions(server, privs, accessPermissions, responsePermissions, method, handlerOptions{
172 authScopeFunc: authScopeFunc,
173 })
174}
175
176// handlerOptions defines behaviour for a given handler's initialization and invocation
177type handlerOptions struct {

Callers 1

CreateAdminRouterFunction · 0.85

Calls 1

makeHandlerWithOptionsFunction · 0.85

Tested by

no test coverage detected