public String index()

in app/src/main/java/com/amazon/aws/partners/saasfactory/pgrls/controller/TenantController.java [64:76]


    public String index(Authentication authentication, Model model) {
        LOGGER.info("Authenticated tenant {}", ((Tenant) authentication.getPrincipal()).getId());
        Tenant tenant = new Tenant();
        if (model.containsAttribute("selectedTenant")) {
            String selectedTenantId = String.valueOf(model.getAttribute("selectedTenant"));
            LOGGER.info("Redirected with existing selected tenant {}", selectedTenantId);
            tenant.setId(selectedTenantId);
        }
        // Provide a list of all tenants so the demo can force cross-tenant access
        model.addAttribute("tenants", adminService.getTenants());
        model.addAttribute("selectedTenant", tenant);
        return "tenant";
    }