mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-23 00:17:10 +08:00
NM-258: fix func comment
This commit is contained in:
+2
-7
@@ -133,13 +133,8 @@ func authenticate(response http.ResponseWriter, request *http.Request) {
|
||||
response.Write(successJSONResponse)
|
||||
}
|
||||
|
||||
// The middleware for most requests to the API
|
||||
// They all pass through here first
|
||||
// This will validate the JWT (or check for master token)
|
||||
// This will also check against the authNetwork and make sure the node should be accessing that endpoint,
|
||||
// even if it's technically ok
|
||||
// This is kind of a poor man's RBAC. There's probably a better/smarter way.
|
||||
// TODO: Consider better RBAC implementations
|
||||
// AuthorizeHost - middleware that authenticates a host via JWT and ensures
|
||||
// the host is only operating on its own resources (matched by hostid/nodeid path params).
|
||||
func AuthorizeHost(
|
||||
next http.Handler,
|
||||
) http.HandlerFunc {
|
||||
|
||||
Reference in New Issue
Block a user