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++; } }