Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Bill Burke 2016-01-07 17:25:58 -05:00
commit 2892b093ab
5 changed files with 102 additions and 7 deletions

View file

@ -642,11 +642,6 @@ public class RealmRepresentation {
identityProviders.add(identityProviderRepresentation);
}
@Deprecated
public boolean isIdentityFederationEnabled() {
return identityProviders != null && !identityProviders.isEmpty();
}
public List<ProtocolMapperRepresentation> getProtocolMappers() {
return protocolMappers;
}

View file

@ -1615,7 +1615,7 @@ module.controller('ClientProtocolMapperCtrl', function($scope, realm, serverInfo
};
$scope.remove = function() {
Dialog.confirmDelete($scope.mapper.name, 'mapper', function() {
Dialog.confirmDelete($scope.model.mapper.name, 'mapper', function() {
ClientProtocolMapper.remove({ realm: realm.realm, client: client.id, id : $scope.model.mapper.id }, function() {
Notifications.success("The mapper has been deleted.");
$location.url("/realms/" + realm.realm + '/clients/' + client.id + "/mappers");

View file

@ -3,6 +3,7 @@ package org.keycloak.provider;
import org.jboss.logging.Logger;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@ -52,10 +53,17 @@ public class ProviderManager {
List<ProviderFactory> factories = cache.get(spi.getName());
if (factories == null) {
factories = new LinkedList<ProviderFactory>();
IdentityHashMap factoryClasses = new IdentityHashMap();
for (ProviderLoader loader : loaders) {
List<ProviderFactory> f = loader.load(spi);
if (f != null) {
factories.addAll(f);
for (ProviderFactory pf: f) {
// make sure there are no duplicates
if (!factoryClasses.containsKey(pf.getClass())) {
factories.add(pf);
factoryClasses.put(pf.getClass(), pf);
}
}
}
}
}

View file

@ -0,0 +1,16 @@
[ {
"realm" : "master",
"users" : [ {
"username" : "admin",
"enabled" : true,
"credentials" : [ {
"type" : "password",
"hashedSaltedValue" : "6K5rvcPu3dXndZOhpzLAVbFtcdlUhbGCrUyV0NNzeS61IdhMpjH8Mf4y/Ag/vHZkw4Ayvtvb9/1iMNOzxR0M6g==",
"salt" : "/6M1jTMUB0uR8EOkksFn/A==",
"hashIterations" : 100000,
"algorithm" : "pbkdf2"
} ],
"realmRoles" : [ "admin" ]
} ],
"identityFederationEnabled" : false
} ]

View file

@ -91,6 +91,7 @@
<auth.server.management.port.jmx>${auth.server.management.port.jmx}</auth.server.management.port.jmx>
<auth.server.ssl.required>${auth.server.ssl.required}</auth.server.ssl.required>
<startup.timeout.sec>${startup.timeout.sec}</startup.timeout.sec>
<jboss.server.config.dir>${project.build.directory}/undertow-configuration</jboss.server.config.dir>
</systemPropertyVariables>
<properties>
<property>
@ -127,6 +128,31 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-admin-user-json-file</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/undertow-configuration</outputDirectory>
<resources>
<resource>
<directory>src/test/resources</directory>
<includes>
<include>keycloak-add-user.json</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
@ -413,6 +439,31 @@
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-admin-user-json-file</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${auth.server.wildfly.home}/standalone/configuration</outputDirectory>
<resources>
<resource>
<directory>src/test/resources</directory>
<includes>
<include>keycloak-add-user.json</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
@ -473,6 +524,31 @@
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-admin-user-json-file</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${auth.server.eap6.home}/standalone/configuration</outputDirectory>
<resources>
<resource>
<directory>src/test/resources</directory>
<includes>
<include>keycloak-add-user.json</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>