private void enhanceFromConfigFile(PortalConfigEntity portalConfigEntity) { //hack until authent config takes place in the database boolean found = true; int idx = 0; while (found) { String type = environment.getProperty("security.providers[" + idx + "].type"); found = (type != null); if (found) { String clientId = environment.getProperty("security.providers[" + idx + "].clientId"); if ("google".equals(type)) { portalConfigEntity.getAuthentication().getGoogle().setClientId(clientId); } else if ("github".equals(type)) { portalConfigEntity.getAuthentication().getGithub().setClientId(clientId); } else if ("oauth2".equals(type)) { portalConfigEntity.getAuthentication().getOauth2().setClientId(clientId); } } idx++; } }
private void enhanceFromConfigFile(PortalConfigEntity portalConfigEntity) { //hack until authent config takes place in the database boolean found = true; int idx = 0; while (found) { String type = environment.getProperty("security.providers[" + idx + "].type"); found = (type != null); if (found) { String clientId = environment.getProperty("security.providers[" + idx + "].clientId"); if ("google".equals(type)) { portalConfigEntity.getAuthentication().getGoogle().setClientId(clientId); } else if ("github".equals(type)) { portalConfigEntity.getAuthentication().getGithub().setClientId(clientId); } else if ("oauth2".equals(type)) { portalConfigEntity.getAuthentication().getOauth2().setClientId(clientId); } } idx++; } }
private Object[] getObjectArray(PortalConfigEntity portalConfigEntity) { return new Object[]{ portalConfigEntity, portalConfigEntity.getAuthentication(), portalConfigEntity.getAuthentication().getGithub(), portalConfigEntity.getAuthentication().getGoogle(), portalConfigEntity.getAuthentication().getOauth2(), portalConfigEntity.getCompany(), portalConfigEntity.getDocumentation(), portalConfigEntity.getManagement(), portalConfigEntity.getPortal(), portalConfigEntity.getPortal().getApis(), portalConfigEntity.getPortal().getAnalytics(), portalConfigEntity.getPortal().getDashboard(), portalConfigEntity.getPortal().getRating(), portalConfigEntity.getPortal().getRating().getComment(), portalConfigEntity.getPortal().getUploadMedia(), portalConfigEntity.getScheduler(), portalConfigEntity.getTheme(), portalConfigEntity.getPlan(), portalConfigEntity.getPlan().getSecurity(), portalConfigEntity.getApiQualityMetrics() }; } }
private Object[] getObjectArray(PortalConfigEntity portalConfigEntity) { return new Object[]{ portalConfigEntity, portalConfigEntity.getAuthentication(), portalConfigEntity.getAuthentication().getGithub(), portalConfigEntity.getAuthentication().getGoogle(), portalConfigEntity.getAuthentication().getOauth2(), portalConfigEntity.getCompany(), portalConfigEntity.getDocumentation(), portalConfigEntity.getManagement(), portalConfigEntity.getPortal(), portalConfigEntity.getPortal().getApis(), portalConfigEntity.getPortal().getAnalytics(), portalConfigEntity.getPortal().getDashboard(), portalConfigEntity.getPortal().getRating(), portalConfigEntity.getPortal().getRating().getComment(), portalConfigEntity.getPortal().getUploadMedia(), portalConfigEntity.getScheduler(), portalConfigEntity.getTheme(), portalConfigEntity.getPlan(), portalConfigEntity.getPlan().getSecurity(), portalConfigEntity.getApiQualityMetrics() }; } }