Fix for KEYCLOAK-116

This commit is contained in:
Stian Thorgersen 2013-10-22 14:14:31 +01:00
parent bb3a82f932
commit 3ee6f02068

View file

@ -88,18 +88,20 @@ public interface FormService {
private String contextPath;
public FormServiceDataBean(RealmModel realm, UserModel userModel, MultivaluedMap<String, String> formData, String message){
public FormServiceDataBean(RealmModel realm, UserModel userModel, MultivaluedMap<String, String> formData, String message) {
this.realm = realm;
this.userModel = userModel;
this.formData = formData;
this.message = message;
socialProviders = new LinkedList<SocialProvider>();
HashMap<String,String> socialConfig = realm.getSocialConfig();
for (Iterator<SocialProvider> itr = ServiceRegistry.lookupProviders(org.keycloak.social.SocialProvider.class); itr.hasNext();) {
SocialProvider p = itr.next();
if (socialConfig.containsKey(p.getId() + ".key") && socialConfig.containsKey(p.getId() + ".secret")) {
socialProviders.add(p);
HashMap<String, String> socialConfig = realm.getSocialConfig();
if (socialConfig != null) {
for (Iterator<SocialProvider> itr = ServiceRegistry.lookupProviders(org.keycloak.social.SocialProvider.class); itr.hasNext(); ) {
SocialProvider p = itr.next();
if (socialConfig.containsKey(p.getId() + ".key") && socialConfig.containsKey(p.getId() + ".secret")) {
socialProviders.add(p);
}
}
}
}