KEYCLOAK-1749 Moved clien registration api

This commit is contained in:
Stian Thorgersen 2015-11-18 15:09:32 +01:00
parent 1ff5d6eb06
commit 41c9289f14
13 changed files with 97 additions and 12 deletions

View file

@ -2,14 +2,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-client-registration-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version> <version>1.7.0.Final-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-client-api</artifactId> <artifactId>keycloak-client-registration-api</artifactId>
<name>Keycloak Client API</name> <name>Keycloak Client Registration API</name>
<description/> <description/>
<dependencies> <dependencies>
@ -21,11 +21,6 @@
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

34
client-registration/cli/pom.xml Executable file
View file

@ -0,0 +1,34 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>keycloak-client-registration-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-client-registration-cli</artifactId>
<name>Keycloak Client Registration CLI</name>
<description/>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-client-registration-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.aesh</groupId>
<artifactId>aesh</artifactId>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,27 @@
package org.keycloak.client.registration.cli;
import org.jboss.aesh.console.AeshConsole;
import org.jboss.aesh.console.AeshConsoleBuilder;
import org.jboss.aesh.console.Prompt;
import org.jboss.aesh.console.settings.Settings;
import org.jboss.aesh.console.settings.SettingsBuilder;
/**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/
public class ClientRegistrationCLI {
public static void main(String[] args) {
Settings settings = new SettingsBuilder().logging(true).create();
AeshConsole aeshConsole = new AeshConsoleBuilder().settings(settings)
.prompt(new Prompt("[aesh@rules]$ "))
// .command()
.create();
aeshConsole.start();
}
}

19
client-registration/pom.xml Executable file
View file

@ -0,0 +1,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
</parent>
<name>Keycloak Client Registration Parent</name>
<description/>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-client-registration-parent</artifactId>
<packaging>pom</packaging>
<modules>
<module>api</module>
<module>cli</module>
</modules>
</project>

13
pom.xml
View file

@ -76,6 +76,7 @@
<log4j.version>1.2.17</log4j.version> <log4j.version>1.2.17</log4j.version>
<greenmail.version>1.3.1b</greenmail.version> <greenmail.version>1.3.1b</greenmail.version>
<xmlsec.version>1.5.1</xmlsec.version> <xmlsec.version>1.5.1</xmlsec.version>
<aesh.version>0.66</aesh.version>
<enforcer.plugin.version>1.4</enforcer.plugin.version> <enforcer.plugin.version>1.4</enforcer.plugin.version>
<jboss.as.plugin.version>7.5.Final</jboss.as.plugin.version> <jboss.as.plugin.version>7.5.Final</jboss.as.plugin.version>
@ -135,7 +136,7 @@
<modules> <modules>
<module>common</module> <module>common</module>
<module>core</module> <module>core</module>
<module>client-api</module> <module>client-registration</module>
<module>connections</module> <module>connections</module>
<module>dependencies</module> <module>dependencies</module>
<module>events</module> <module>events</module>
@ -580,6 +581,11 @@
<artifactId>pax-web-runtime</artifactId> <artifactId>pax-web-runtime</artifactId>
<version>${pax.web.version}</version> <version>${pax.web.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.jboss.aesh</groupId>
<artifactId>aesh</artifactId>
<version>${aesh.version}</version>
</dependency>
<!-- keycloak --> <!-- keycloak -->
<dependency> <dependency>
@ -622,6 +628,11 @@
<artifactId>keycloak-connections-http-client</artifactId> <artifactId>keycloak-connections-http-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-client-registration-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<artifactId>keycloak-connections-mongo-update</artifactId> <artifactId>keycloak-connections-mongo-update</artifactId>

View file

@ -9,8 +9,6 @@ import org.keycloak.common.enums.SslRequired;
import org.keycloak.representations.adapters.config.AdapterConfig; import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.ClientRepresentation;
import javax.ws.rs.core.Response;
import static org.junit.Assert.*; import static org.junit.Assert.*;
/** /**
@ -37,6 +35,7 @@ public class AdapterInstallationConfigTest extends AbstractClientRegistrationTes
client.setRegistrationAccessToken("RegistrationAccessTokenTestRegistrationAccessToken"); client.setRegistrationAccessToken("RegistrationAccessTokenTestRegistrationAccessToken");
client.setRootUrl("http://root"); client.setRootUrl("http://root");
client = createClient(client); client = createClient(client);
client.setSecret("RegistrationAccessTokenTestClientSecret");
client2 = new ClientRepresentation(); client2 = new ClientRepresentation();
client2.setEnabled(true); client2.setEnabled(true);

View file

@ -230,7 +230,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<artifactId>keycloak-client-api</artifactId> <artifactId>keycloak-client-registration-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>