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)
| 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. |
| 170 | func 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 |
| 177 | type handlerOptions struct { |
no test coverage detected