code: private void validateTenantAccess(HttpServletRequest request, Tenant tenant, RegisteredCommand cmdModel) {
          String authString = request.getHeader("Authorization");
          StringBuilder userID = new StringBuilder();
          StringBuilder password = new StringBuilder();
          decodeAuthorizationHeader(authString, userID, password);
          Permission perm = permissionForMethod(request.getMethod());
          TenantService.instance().validateTenantAccess(tenant, userID.toString(), password.toString(), 
                                                        perm, cmdModel.isPrivileged());
      }
docs: Extract Authorization header, if any, and validate this command for the given tenant.