Compare commits
31
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7552eebd1b | ||
|
|
71a721a80a | ||
|
|
3a992ce05f | ||
|
|
20d2da15db | ||
|
|
fc019f7150 | ||
|
|
7505c9d0b7 | ||
|
|
e9f6bf2c6b | ||
|
|
336372a23d | ||
|
|
efff6bf2e0 | ||
|
|
b9532419ef | ||
|
|
f4811b423c | ||
|
|
00d1e0fce3 | ||
|
|
6cab6532ed | ||
|
|
430108455f | ||
|
|
28acd183cc | ||
|
|
5b5405c1eb | ||
|
|
7ff64078fd | ||
|
|
08f8b06de2 | ||
|
|
45b58de49f | ||
|
|
a0368908aa | ||
|
|
f3f4b8dee7 | ||
|
|
783f484386 | ||
|
|
cf97bf48bf | ||
|
|
72c5afbeb7 | ||
|
|
fec74f2621 | ||
|
|
ba740c13c6 | ||
|
|
bc78e878d2 | ||
|
|
5da1858d99 | ||
|
|
4833dd82cb | ||
|
|
dd74ec97f5 | ||
|
|
76ccc9ea63 |
No files matched your search
+2
-4
@@ -3,8 +3,6 @@ language: java
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.m2
|
- $HOME/.m2
|
||||||
|
|
||||||
before_cache:
|
|
||||||
- rm -rf $HOME/.m2/repository/org/keycloak
|
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
after_script: 'misc/.travis/after.sh'
|
||||||
+50
-50
@@ -1,50 +1,50 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-broker-core</artifactId>
|
<artifactId>keycloak-broker-core</artifactId>
|
||||||
<name>Keycloak Broker Core</name>
|
<name>Keycloak Broker Core</name>
|
||||||
<description/>
|
<description/>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-model-api</artifactId>
|
<artifactId>keycloak-model-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-events-api</artifactId>
|
<artifactId>keycloak-events-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
<artifactId>resteasy-jaxrs</artifactId>
|
<artifactId>resteasy-jaxrs</artifactId>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>log4j</groupId>
|
<groupId>log4j</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>log4j</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -73,11 +73,6 @@ public abstract class AbstractIdentityProvider<C extends IdentityProviderModel>
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, BrokeredIdentityContext context) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context) {
|
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context) {
|
||||||
|
|
||||||
|
|||||||
-2
@@ -18,10 +18,8 @@
|
|||||||
package org.keycloak.broker.provider;
|
package org.keycloak.broker.provider;
|
||||||
|
|
||||||
import org.keycloak.Config;
|
import org.keycloak.Config;
|
||||||
import org.keycloak.models.IdentityProviderModel;
|
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.KeycloakSessionFactory;
|
import org.keycloak.models.KeycloakSessionFactory;
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|||||||
-7
@@ -1,10 +1,8 @@
|
|||||||
package org.keycloak.broker.provider;
|
package org.keycloak.broker.provider;
|
||||||
|
|
||||||
import org.keycloak.broker.provider.IdentityProviderMapper;
|
import org.keycloak.broker.provider.IdentityProviderMapper;
|
||||||
import org.keycloak.models.IdentityProviderMapperModel;
|
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.KeycloakSessionFactory;
|
import org.keycloak.models.KeycloakSessionFactory;
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||||
@@ -30,9 +28,4 @@ public abstract class AbstractIdentityProviderMapper implements IdentityProvider
|
|||||||
public void postInit(KeycloakSessionFactory factory) {
|
public void postInit(KeycloakSessionFactory factory) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,6 @@ public class BrokeredIdentityContext {
|
|||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
private String username;
|
private String username;
|
||||||
private String modelUsername;
|
|
||||||
private String email;
|
private String email;
|
||||||
private String firstName;
|
private String firstName;
|
||||||
private String lastName;
|
private String lastName;
|
||||||
@@ -60,11 +59,6 @@ public class BrokeredIdentityContext {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Username in remote idp
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
@@ -73,19 +67,6 @@ public class BrokeredIdentityContext {
|
|||||||
this.username = username;
|
this.username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* username to store in UserModel
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String getModelUsername() {
|
|
||||||
return modelUsername;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModelUsername(String modelUsername) {
|
|
||||||
this.modelUsername = modelUsername;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ package org.keycloak.broker.provider;
|
|||||||
import org.keycloak.events.EventBuilder;
|
import org.keycloak.events.EventBuilder;
|
||||||
import org.keycloak.models.ClientSessionModel;
|
import org.keycloak.models.ClientSessionModel;
|
||||||
import org.keycloak.models.FederatedIdentityModel;
|
import org.keycloak.models.FederatedIdentityModel;
|
||||||
import org.keycloak.models.IdentityProviderMapperModel;
|
|
||||||
import org.keycloak.models.IdentityProviderModel;
|
import org.keycloak.models.IdentityProviderModel;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.RealmModel;
|
import org.keycloak.models.RealmModel;
|
||||||
@@ -36,7 +35,7 @@ import javax.ws.rs.core.UriInfo;
|
|||||||
*/
|
*/
|
||||||
public interface IdentityProvider<C extends IdentityProviderModel> extends Provider {
|
public interface IdentityProvider<C extends IdentityProviderModel> extends Provider {
|
||||||
|
|
||||||
interface AuthenticationCallback {
|
public interface AuthenticationCallback {
|
||||||
/**
|
/**
|
||||||
* This method should be called by provider after the JAXRS callback endpoint has finished authentication
|
* This method should be called by provider after the JAXRS callback endpoint has finished authentication
|
||||||
* with the remote IDP
|
* with the remote IDP
|
||||||
@@ -44,15 +43,9 @@ public interface IdentityProvider<C extends IdentityProviderModel> extends Provi
|
|||||||
* @param context
|
* @param context
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Response authenticated(BrokeredIdentityContext context);
|
public Response authenticated(BrokeredIdentityContext context);
|
||||||
|
|
||||||
Response cancelled(String code);
|
|
||||||
|
|
||||||
Response error(String code, String message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, BrokeredIdentityContext context);
|
|
||||||
void attachUserSession(UserSessionModel userSession, ClientSessionModel clientSession, BrokeredIdentityContext context);
|
void attachUserSession(UserSessionModel userSession, ClientSessionModel clientSession, BrokeredIdentityContext context);
|
||||||
void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context);
|
void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context);
|
||||||
void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context);
|
void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, BrokeredIdentityContext context);
|
||||||
|
|||||||
Executable → Regular
-2
@@ -18,8 +18,6 @@
|
|||||||
package org.keycloak.broker.provider;
|
package org.keycloak.broker.provider;
|
||||||
|
|
||||||
import org.keycloak.models.IdentityProviderModel;
|
import org.keycloak.models.IdentityProviderModel;
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
import org.keycloak.provider.ProviderFactory;
|
import org.keycloak.provider.ProviderFactory;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|||||||
@@ -19,37 +19,7 @@ public interface IdentityProviderMapper extends Provider, ProviderFactory<Identi
|
|||||||
String getDisplayCategory();
|
String getDisplayCategory();
|
||||||
String getDisplayType();
|
String getDisplayType();
|
||||||
|
|
||||||
/**
|
|
||||||
* Called to determine what keycloak username and email to use to process the login request from the external IDP
|
|
||||||
* Usually used to map BrokeredIdentityContet.username or email.
|
|
||||||
*
|
|
||||||
* @param session
|
|
||||||
* @param realm
|
|
||||||
* @param mapperModel
|
|
||||||
* @param context
|
|
||||||
*/
|
|
||||||
void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called after UserModel is created for first time for this user.
|
|
||||||
*
|
|
||||||
* @param session
|
|
||||||
* @param realm
|
|
||||||
* @param user
|
|
||||||
* @param mapperModel
|
|
||||||
* @param context
|
|
||||||
*/
|
|
||||||
void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context);
|
void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context);
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when this user has logged in before and has already been imported.
|
|
||||||
*
|
|
||||||
* @param session
|
|
||||||
* @param realm
|
|
||||||
* @param user
|
|
||||||
* @param mapperModel
|
|
||||||
* @param context
|
|
||||||
*/
|
|
||||||
void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context);
|
void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ import org.keycloak.provider.Spi;
|
|||||||
*/
|
*/
|
||||||
public class IdentityProviderMapperSpi implements Spi {
|
public class IdentityProviderMapperSpi implements Spi {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "identity-provider-mapper";
|
return "identity-provider-mapper";
|
||||||
|
|||||||
@@ -28,11 +28,6 @@ public class IdentityProviderSpi implements Spi {
|
|||||||
|
|
||||||
public static final String IDENTITY_PROVIDER_SPI_NAME = "identity_provider";
|
public static final String IDENTITY_PROVIDER_SPI_NAME = "identity_provider";
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return IDENTITY_PROVIDER_SPI_NAME;
|
return IDENTITY_PROVIDER_SPI_NAME;
|
||||||
|
|||||||
+58
-58
@@ -1,58 +1,58 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-broker-oidc</artifactId>
|
<artifactId>keycloak-broker-oidc</artifactId>
|
||||||
<name>Keycloak Broker - OpenID Connect Identity Provider</name>
|
<name>Keycloak Broker - OpenID Connect Identity Provider</name>
|
||||||
<description/>
|
<description/>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-broker-core</artifactId>
|
<artifactId>keycloak-broker-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
<artifactId>jackson-core-asl</artifactId>
|
<artifactId>jackson-core-asl</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
<artifactId>jackson-mapper-asl</artifactId>
|
<artifactId>jackson-mapper-asl</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-events-api</artifactId>
|
<artifactId>keycloak-events-api</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-services</artifactId>
|
<artifactId>keycloak-services</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.logging</groupId>
|
<groupId>org.jboss.logging</groupId>
|
||||||
<artifactId>jboss-logging</artifactId>
|
<artifactId>jboss-logging</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
+3
-6
@@ -58,7 +58,6 @@ public abstract class AbstractOAuth2IdentityProvider<C extends OAuth2IdentityPro
|
|||||||
public static final String FEDERATED_ACCESS_TOKEN = "FEDERATED_ACCESS_TOKEN";
|
public static final String FEDERATED_ACCESS_TOKEN = "FEDERATED_ACCESS_TOKEN";
|
||||||
public static final String FEDERATED_REFRESH_TOKEN = "FEDERATED_REFRESH_TOKEN";
|
public static final String FEDERATED_REFRESH_TOKEN = "FEDERATED_REFRESH_TOKEN";
|
||||||
public static final String FEDERATED_TOKEN_EXPIRATION = "FEDERATED_TOKEN_EXPIRATION";
|
public static final String FEDERATED_TOKEN_EXPIRATION = "FEDERATED_TOKEN_EXPIRATION";
|
||||||
public static final String ACCESS_DENIED = "access_denied";
|
|
||||||
protected static ObjectMapper mapper = new ObjectMapper();
|
protected static ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
||||||
public static final String OAUTH2_PARAMETER_ACCESS_TOKEN = "access_token";
|
public static final String OAUTH2_PARAMETER_ACCESS_TOKEN = "access_token";
|
||||||
@@ -214,11 +213,9 @@ public abstract class AbstractOAuth2IdentityProvider<C extends OAuth2IdentityPro
|
|||||||
@QueryParam(OAuth2Constants.ERROR) String error) {
|
@QueryParam(OAuth2Constants.ERROR) String error) {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
//logger.error("Failed " + getConfig().getAlias() + " broker login: " + error);
|
//logger.error("Failed " + getConfig().getAlias() + " broker login: " + error);
|
||||||
if (error.equals(ACCESS_DENIED)) {
|
event.event(EventType.LOGIN);
|
||||||
return callback.cancelled(state);
|
event.error(error);
|
||||||
} else {
|
return ErrorPage.error(session, Messages.IDENTITY_PROVIDER_UNEXPECTED_ERROR);
|
||||||
return callback.error(state, Messages.IDENTITY_PROVIDER_UNEXPECTED_ERROR);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
+1
-7
@@ -17,15 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
package org.keycloak.broker.oidc;
|
package org.keycloak.broker.oidc;
|
||||||
|
|
||||||
import org.keycloak.broker.oidc.mappers.UsernameTemplateMapper;
|
|
||||||
import org.keycloak.broker.provider.AbstractIdentityProviderFactory;
|
import org.keycloak.broker.provider.AbstractIdentityProviderFactory;
|
||||||
import org.keycloak.models.IdentityProviderMapperModel;
|
|
||||||
import org.keycloak.models.IdentityProviderModel;
|
import org.keycloak.models.IdentityProviderModel;
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,5 +50,4 @@ public class KeycloakOIDCIdentityProviderFactory extends AbstractIdentityProvide
|
|||||||
return OIDCIdentityProviderFactory.parseOIDCConfig(inputStream);
|
return OIDCIdentityProviderFactory.parseOIDCConfig(inputStream);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -19,7 +19,6 @@ package org.keycloak.broker.oidc;
|
|||||||
|
|
||||||
import org.codehaus.jackson.JsonNode;
|
import org.codehaus.jackson.JsonNode;
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
import org.keycloak.broker.oidc.mappers.AbstractJsonUserAttributeMapper;
|
|
||||||
import org.keycloak.broker.oidc.util.JsonSimpleHttp;
|
import org.keycloak.broker.oidc.util.JsonSimpleHttp;
|
||||||
import org.keycloak.broker.provider.util.SimpleHttp;
|
import org.keycloak.broker.provider.util.SimpleHttp;
|
||||||
import org.keycloak.broker.provider.AuthenticationRequest;
|
import org.keycloak.broker.provider.AuthenticationRequest;
|
||||||
@@ -51,7 +50,6 @@ import javax.ws.rs.core.Context;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.UriBuilder;
|
import javax.ws.rs.core.UriBuilder;
|
||||||
import javax.ws.rs.core.UriInfo;
|
import javax.ws.rs.core.UriInfo;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.PublicKey;
|
import java.security.PublicKey;
|
||||||
|
|
||||||
@@ -226,7 +224,7 @@ public class OIDCIdentityProvider extends AbstractOAuth2IdentityProvider<OIDCIde
|
|||||||
name = getJsonProperty(userInfo, "name");
|
name = getJsonProperty(userInfo, "name");
|
||||||
preferredUsername = getJsonProperty(userInfo, "preferred_username");
|
preferredUsername = getJsonProperty(userInfo, "preferred_username");
|
||||||
email = getJsonProperty(userInfo, "email");
|
email = getJsonProperty(userInfo, "email");
|
||||||
AbstractJsonUserAttributeMapper.storeUserProfileForMapper(identity, userInfo, getConfig().getAlias());
|
identity.getContextData().put(USER_INFO, userInfo);
|
||||||
}
|
}
|
||||||
identity.getContextData().put(FEDERATED_ACCESS_TOKEN_RESPONSE, tokenResponse);
|
identity.getContextData().put(FEDERATED_ACCESS_TOKEN_RESPONSE, tokenResponse);
|
||||||
identity.getContextData().put(VALIDATED_ID_TOKEN, idToken);
|
identity.getContextData().put(VALIDATED_ID_TOKEN, idToken);
|
||||||
|
|||||||
@@ -17,15 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
package org.keycloak.broker.oidc;
|
package org.keycloak.broker.oidc;
|
||||||
|
|
||||||
import org.keycloak.broker.oidc.mappers.UsernameTemplateMapper;
|
|
||||||
import org.keycloak.broker.provider.util.SimpleHttp;
|
import org.keycloak.broker.provider.util.SimpleHttp;
|
||||||
import org.keycloak.broker.provider.AbstractIdentityProviderFactory;
|
import org.keycloak.broker.provider.AbstractIdentityProviderFactory;
|
||||||
import org.keycloak.jose.jwk.JWK;
|
import org.keycloak.jose.jwk.JWK;
|
||||||
import org.keycloak.jose.jwk.JWKParser;
|
import org.keycloak.jose.jwk.JWKParser;
|
||||||
import org.keycloak.models.IdentityProviderMapperModel;
|
|
||||||
import org.keycloak.models.IdentityProviderModel;
|
import org.keycloak.models.IdentityProviderModel;
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
import org.keycloak.models.utils.KeycloakModelUtils;
|
import org.keycloak.models.utils.KeycloakModelUtils;
|
||||||
import org.keycloak.protocol.oidc.representations.JSONWebKeySet;
|
import org.keycloak.protocol.oidc.representations.JSONWebKeySet;
|
||||||
import org.keycloak.protocol.oidc.representations.OIDCConfigurationRepresentation;
|
import org.keycloak.protocol.oidc.representations.OIDCConfigurationRepresentation;
|
||||||
@@ -34,7 +30,6 @@ import org.keycloak.util.JsonSerialization;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.security.PublicKey;
|
import java.security.PublicKey;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -94,7 +89,7 @@ public class OIDCIdentityProviderFactory extends AbstractIdentityProviderFactory
|
|||||||
|
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException("Failed to query JWKSet from: " + uri, e);
|
throw new RuntimeException("F ailed to query JWKSet from: " + uri, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -104,5 +99,4 @@ public class OIDCIdentityProviderFactory extends AbstractIdentityProviderFactory
|
|||||||
protected static boolean keyTypeSupported(String type) {
|
protected static boolean keyTypeSupported(String type) {
|
||||||
return type != null && type.equals("RSA");
|
return type != null && type.equals("RSA");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -33,12 +33,8 @@ public abstract class AbstractClaimMapper extends AbstractIdentityProviderMapper
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object getClaimValue(IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
protected Object getClaimValue(IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
||||||
String claim = mapperModel.getConfig().get(CLAIM);
|
String claim = mapperModel.getConfig().get(CLAIM);
|
||||||
return getClaimValue(context, claim);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Object getClaimValue(BrokeredIdentityContext context, String claim) {
|
|
||||||
{ // search access token
|
{ // search access token
|
||||||
JsonWebToken token = (JsonWebToken)context.getContextData().get(KeycloakOIDCIdentityProvider.VALIDATED_ACCESS_TOKEN);
|
JsonWebToken token = (JsonWebToken)context.getContextData().get(KeycloakOIDCIdentityProvider.VALIDATED_ACCESS_TOKEN);
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
|
|||||||
-206
@@ -1,206 +0,0 @@
|
|||||||
package org.keycloak.broker.oidc.mappers;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.codehaus.jackson.JsonNode;
|
|
||||||
import org.jboss.logging.Logger;
|
|
||||||
import org.keycloak.broker.oidc.OIDCIdentityProvider;
|
|
||||||
import org.keycloak.broker.provider.AbstractIdentityProviderMapper;
|
|
||||||
import org.keycloak.broker.provider.BrokeredIdentityContext;
|
|
||||||
import org.keycloak.models.IdentityProviderMapperModel;
|
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
import org.keycloak.models.UserModel;
|
|
||||||
import org.keycloak.provider.ProviderConfigProperty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Abstract class for Social Provider mappers which allow mapping of JSON user profile field into Keycloak user
|
|
||||||
* attribute. Concrete mapper classes with own ID and provider mapping must be implemented for each social provider who
|
|
||||||
* uses {@link JsonNode} user profile.
|
|
||||||
*
|
|
||||||
* @author Vlastimil Elias (velias at redhat dot com)
|
|
||||||
*/
|
|
||||||
public abstract class AbstractJsonUserAttributeMapper extends AbstractIdentityProviderMapper {
|
|
||||||
|
|
||||||
|
|
||||||
protected static final Logger logger = Logger.getLogger(AbstractJsonUserAttributeMapper.class);
|
|
||||||
|
|
||||||
protected static final Logger LOGGER_DUMP_USER_PROFILE = Logger.getLogger("org.keycloak.social.user_profile_dump");
|
|
||||||
|
|
||||||
private static final String JSON_PATH_DELIMITER = ".";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Config param where name of mapping source JSON User Profile field is stored.
|
|
||||||
*/
|
|
||||||
public static final String CONF_JSON_FIELD = "jsonField";
|
|
||||||
/**
|
|
||||||
* Config param where name of mapping target USer attribute is stored.
|
|
||||||
*/
|
|
||||||
public static final String CONF_USER_ATTRIBUTE = "userAttribute";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Key in {@link BrokeredIdentityContext#getContextData()} where {@link JsonNode} with user profile is stored.
|
|
||||||
*/
|
|
||||||
public static final String CONTEXT_JSON_NODE = OIDCIdentityProvider.USER_INFO;
|
|
||||||
|
|
||||||
private static final List<ProviderConfigProperty> configProperties = new ArrayList<ProviderConfigProperty>();
|
|
||||||
|
|
||||||
static {
|
|
||||||
ProviderConfigProperty property;
|
|
||||||
ProviderConfigProperty property1;
|
|
||||||
property1 = new ProviderConfigProperty();
|
|
||||||
property1.setName(CONF_JSON_FIELD);
|
|
||||||
property1.setLabel("Social Profile JSON Field Path");
|
|
||||||
property1.setHelpText("Path of field in Social provider User Profile JSON data to get value from. You can use dot notation for nesting and square brackets for array index. Eg. 'contact.address[0].country'.");
|
|
||||||
property1.setType(ProviderConfigProperty.STRING_TYPE);
|
|
||||||
configProperties.add(property1);
|
|
||||||
property = new ProviderConfigProperty();
|
|
||||||
property.setName(CONF_USER_ATTRIBUTE);
|
|
||||||
property.setLabel("User Attribute Name");
|
|
||||||
property.setHelpText("User attribute name to store information into.");
|
|
||||||
property.setType(ProviderConfigProperty.STRING_TYPE);
|
|
||||||
configProperties.add(property);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store used profile JsonNode into user context for later use by this mapper. Profile data are dumped into special logger if enabled also to allow investigation of the structure.
|
|
||||||
*
|
|
||||||
* @param user context to store profile data into
|
|
||||||
* @param profile to store into context
|
|
||||||
* @param provider identification of social provider to be used in log dump
|
|
||||||
*
|
|
||||||
* @see #importNewUser(KeycloakSession, RealmModel, UserModel, IdentityProviderMapperModel, BrokeredIdentityContext)
|
|
||||||
* @see BrokeredIdentityContext#getContextData()
|
|
||||||
*/
|
|
||||||
public static void storeUserProfileForMapper(BrokeredIdentityContext user, JsonNode profile, String provider) {
|
|
||||||
user.getContextData().put(AbstractJsonUserAttributeMapper.CONTEXT_JSON_NODE, profile);
|
|
||||||
if (LOGGER_DUMP_USER_PROFILE.isDebugEnabled())
|
|
||||||
LOGGER_DUMP_USER_PROFILE.debug("User Profile JSON Data for provider "+provider+": " + profile);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ProviderConfigProperty> getConfigProperties() {
|
|
||||||
return configProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDisplayCategory() {
|
|
||||||
return "Attribute Importer";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDisplayType() {
|
|
||||||
return "Attribute Importer";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHelpText() {
|
|
||||||
return "Import user profile information if it exists in Social provider JSON data into the specified user attribute.";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
String attribute = mapperModel.getConfig().get(CONF_USER_ATTRIBUTE);
|
|
||||||
if (attribute == null || attribute.trim().isEmpty()) {
|
|
||||||
logger.debug("Attribute is not configured");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
attribute = attribute.trim();
|
|
||||||
|
|
||||||
String value = getJsonValue(mapperModel, context);
|
|
||||||
if (value != null) {
|
|
||||||
user.setAttribute(attribute, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
// we do not update user profile from social provider
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static String getJsonValue(IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
|
|
||||||
String jsonField = mapperModel.getConfig().get(CONF_JSON_FIELD);
|
|
||||||
if (jsonField == null || jsonField.trim().isEmpty()) {
|
|
||||||
logger.debug("JSON field path is not configured");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
jsonField = jsonField.trim();
|
|
||||||
|
|
||||||
if (jsonField.startsWith(JSON_PATH_DELIMITER) || jsonField.endsWith(JSON_PATH_DELIMITER) || jsonField.startsWith("[")) {
|
|
||||||
logger.debug("JSON field path is invalid " + jsonField);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
JsonNode profileJsonNode = (JsonNode) context.getContextData().get(CONTEXT_JSON_NODE);
|
|
||||||
|
|
||||||
String value = getJsonValue(profileJsonNode, jsonField);
|
|
||||||
|
|
||||||
if (value == null) {
|
|
||||||
logger.debug("User profile JSON value '" + jsonField + "' is not available.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static String getJsonValue(JsonNode baseNode, String fieldPath) {
|
|
||||||
logger.debug("Going to process JsonNode path " + fieldPath + " on data " + baseNode);
|
|
||||||
if (baseNode != null) {
|
|
||||||
|
|
||||||
int idx = fieldPath.indexOf(JSON_PATH_DELIMITER);
|
|
||||||
|
|
||||||
String currentFieldName = fieldPath;
|
|
||||||
if (idx > 0) {
|
|
||||||
currentFieldName = fieldPath.substring(0, idx).trim();
|
|
||||||
if (currentFieldName.isEmpty()) {
|
|
||||||
logger.debug("JSON path is invalid " + fieldPath);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String currentNodeName = currentFieldName;
|
|
||||||
int arrayIndex = -1;
|
|
||||||
if (currentFieldName.endsWith("]")) {
|
|
||||||
int bi = currentFieldName.indexOf("[");
|
|
||||||
if (bi == -1) {
|
|
||||||
logger.debug("Invalid array index construct in " + currentFieldName);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
String is = currentFieldName.substring(bi+1, currentFieldName.length() - 1).trim();
|
|
||||||
arrayIndex = Integer.parseInt(is);
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.debug("Invalid array index construct in " + currentFieldName);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
currentNodeName = currentFieldName.substring(0,bi).trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
JsonNode currentNode = baseNode.get(currentNodeName);
|
|
||||||
if (arrayIndex > -1 && currentNode.isArray()) {
|
|
||||||
logger.debug("Going to take array node at index " + arrayIndex);
|
|
||||||
currentNode = currentNode.get(arrayIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentNode == null) {
|
|
||||||
logger.debug("JsonNode not found for name " + currentFieldName);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0) {
|
|
||||||
if (!currentNode.isValueNode()) {
|
|
||||||
logger.debug("JsonNode is not value node for name " + currentFieldName);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
String ret = currentNode.asText();
|
|
||||||
if (ret != null && !ret.trim().isEmpty())
|
|
||||||
return ret.trim();
|
|
||||||
} else {
|
|
||||||
return getJsonValue(currentNode, fieldPath.substring(idx + 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-109
@@ -1,109 +0,0 @@
|
|||||||
package org.keycloak.broker.oidc.mappers;
|
|
||||||
|
|
||||||
import org.keycloak.broker.oidc.KeycloakOIDCIdentityProviderFactory;
|
|
||||||
import org.keycloak.broker.oidc.OIDCIdentityProviderFactory;
|
|
||||||
import org.keycloak.broker.provider.BrokeredIdentityContext;
|
|
||||||
import org.keycloak.models.IdentityProviderMapperModel;
|
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
import org.keycloak.models.UserModel;
|
|
||||||
import org.keycloak.models.utils.KeycloakModelUtils;
|
|
||||||
import org.keycloak.provider.ProviderConfigProperty;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class UsernameTemplateMapper extends AbstractClaimMapper {
|
|
||||||
|
|
||||||
public static final String[] COMPATIBLE_PROVIDERS = {KeycloakOIDCIdentityProviderFactory.PROVIDER_ID, OIDCIdentityProviderFactory.PROVIDER_ID};
|
|
||||||
|
|
||||||
private static final List<ProviderConfigProperty> configProperties = new ArrayList<ProviderConfigProperty>();
|
|
||||||
|
|
||||||
public static final String TEMPLATE = "template";
|
|
||||||
|
|
||||||
static {
|
|
||||||
ProviderConfigProperty property;
|
|
||||||
property = new ProviderConfigProperty();
|
|
||||||
property.setName(TEMPLATE);
|
|
||||||
property.setLabel("Template");
|
|
||||||
property.setHelpText("Template to use to format the username to import. Substitutions are enclosed in ${}. For example: '${ALIAS}.${CLAIM.sub}'. ALIAS is the provider alias. CLAIM.<NAME> references an ID or Access token claim.");
|
|
||||||
property.setType(ProviderConfigProperty.STRING_TYPE);
|
|
||||||
property.setDefaultValue("${ALIAS}.${CLAIM.preferred_username}");
|
|
||||||
configProperties.add(property);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final String PROVIDER_ID = "oidc-username-idp-mapper";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ProviderConfigProperty> getConfigProperties() {
|
|
||||||
return configProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getId() {
|
|
||||||
return PROVIDER_ID;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getCompatibleProviders() {
|
|
||||||
return COMPATIBLE_PROVIDERS;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDisplayCategory() {
|
|
||||||
return "Preprocessor";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDisplayType() {
|
|
||||||
return "Username Template Importer";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
}
|
|
||||||
|
|
||||||
static Pattern substitution = Pattern.compile("\\$\\{([^}]+)\\}");
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
String template = mapperModel.getConfig().get(TEMPLATE);
|
|
||||||
Matcher m = substitution.matcher(template);
|
|
||||||
StringBuffer sb = new StringBuffer();
|
|
||||||
while (m.find()) {
|
|
||||||
String variable = m.group(1);
|
|
||||||
if (variable.equals("ALIAS")) {
|
|
||||||
m.appendReplacement(sb, context.getIdpConfig().getAlias());
|
|
||||||
} else if (variable.equals("UUID")) {
|
|
||||||
m.appendReplacement(sb, KeycloakModelUtils.generateId());
|
|
||||||
} else if (variable.startsWith("CLAIM.")) {
|
|
||||||
String name = variable.substring("CLAIM.".length());
|
|
||||||
Object value = AbstractClaimMapper.getClaimValue(context, name);
|
|
||||||
if (value == null) value = "";
|
|
||||||
m.appendReplacement(sb, value.toString());
|
|
||||||
} else {
|
|
||||||
m.appendReplacement(sb, m.group(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
m.appendTail(sb);
|
|
||||||
String username = sb.toString();
|
|
||||||
context.setModelUsername(username);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHelpText() {
|
|
||||||
return "Format the username to import.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
org.keycloak.broker.oidc.mappers.ClaimToRoleMapper
|
org.keycloak.broker.oidc.mappers.ClaimToRoleMapper
|
||||||
org.keycloak.broker.oidc.mappers.ExternalKeycloakRoleToRoleMapper
|
org.keycloak.broker.oidc.mappers.ExternalKeycloakRoleToRoleMapper
|
||||||
org.keycloak.broker.oidc.mappers.UserAttributeMapper
|
org.keycloak.broker.oidc.mappers.UserAttributeMapper
|
||||||
org.keycloak.broker.oidc.mappers.UsernameTemplateMapper
|
|
||||||
-120
@@ -1,120 +0,0 @@
|
|||||||
/*
|
|
||||||
* JBoss, Home of Professional Open Source
|
|
||||||
* Copyright 2015 Red Hat Inc. and/or its affiliates and other contributors
|
|
||||||
* as indicated by the @authors tag. All rights reserved.
|
|
||||||
*/
|
|
||||||
package org.keycloak.broker.oidc.mappers;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import org.codehaus.jackson.JsonNode;
|
|
||||||
import org.codehaus.jackson.JsonProcessingException;
|
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for {@link AbstractJsonUserAttributeMapper}
|
|
||||||
*
|
|
||||||
* @author Vlastimil Elias (velias at redhat dot com)
|
|
||||||
*/
|
|
||||||
public class AbstractJsonUserAttributeMapperTest {
|
|
||||||
|
|
||||||
private static ObjectMapper mapper = new ObjectMapper();
|
|
||||||
|
|
||||||
private static JsonNode baseNode;
|
|
||||||
|
|
||||||
private JsonNode getJsonNode() throws JsonProcessingException, IOException {
|
|
||||||
if (baseNode == null)
|
|
||||||
baseNode = mapper.readTree("{ \"value1\" : \"v1 \",\"value_empty\" : \"\", \"value_b\" : true, \"value_i\" : 454, " + " \"value_array\":[\"a1\",\"a2\"], " +" \"nest1\": {\"value1\": \" fgh \",\"value_empty\" : \"\", \"nest2\":{\"value_b\" : false, \"value_i\" : 43}}, "+ " \"nesta\": { \"a\":[{\"av1\": \"vala1\"},{\"av1\": \"vala2\"}]}"+" }");
|
|
||||||
return baseNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void getJsonValue_invalidPath() throws JsonProcessingException, IOException {
|
|
||||||
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "."));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), ".."));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "...value1"));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), ".value1"));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value1."));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "[]"));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "[value1"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void getJsonValue_simpleValues() throws JsonProcessingException, IOException {
|
|
||||||
|
|
||||||
//unknown field returns null
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_unknown"));
|
|
||||||
|
|
||||||
// we check value is trimmed also!
|
|
||||||
Assert.assertEquals("v1", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value1"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_empty"));
|
|
||||||
|
|
||||||
Assert.assertEquals("true", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_b"));
|
|
||||||
Assert.assertEquals("454", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_i"));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void getJsonValue_nestedSimpleValues() throws JsonProcessingException, IOException {
|
|
||||||
|
|
||||||
// null if path points to JSON object
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1.nest2"));
|
|
||||||
|
|
||||||
//unknown field returns null
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1.value_unknown"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1.nest2.value_unknown"));
|
|
||||||
|
|
||||||
// we check value is trimmed also!
|
|
||||||
Assert.assertEquals("fgh", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1.value1"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1.value_empty"));
|
|
||||||
|
|
||||||
Assert.assertEquals("false", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1.nest2.value_b"));
|
|
||||||
Assert.assertEquals("43", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1.nest2.value_i"));
|
|
||||||
|
|
||||||
// null if invalid nested path
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1."));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nest1.nest2."));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void getJsonValue_simpleArray() throws JsonProcessingException, IOException {
|
|
||||||
|
|
||||||
// array field itself returns null if no index is provided
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array"));
|
|
||||||
// outside index returns null
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array[2]"));
|
|
||||||
|
|
||||||
//corect index
|
|
||||||
Assert.assertEquals("a1", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array[0]"));
|
|
||||||
Assert.assertEquals("a2", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array[1]"));
|
|
||||||
|
|
||||||
//incorrect array constructs
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array[]"));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array]"));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array["));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array[a]"));
|
|
||||||
Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "value_array[-2]"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void getJsonValue_nestedArrayWithObjects() throws JsonProcessingException, IOException {
|
|
||||||
Assert.assertEquals("vala1", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a[0].av1"));
|
|
||||||
Assert.assertEquals("vala2", AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a[1].av1"));
|
|
||||||
|
|
||||||
//different path erros or nonexisting indexes or fields return null
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a[2].av1"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a[0]"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a[0].av_unknown"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a[].av1"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a.av1"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a].av1"));
|
|
||||||
Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(getJsonNode(), "nesta.a[.av1"));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+23
-23
@@ -1,23 +1,23 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-broker-parent</artifactId>
|
<artifactId>keycloak-broker-parent</artifactId>
|
||||||
<name>Keycloak Broker Parent</name>
|
<name>Keycloak Broker Parent</name>
|
||||||
<description/>
|
<description/>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>core</module>
|
<module>core</module>
|
||||||
<module>oidc</module>
|
<module>oidc</module>
|
||||||
<module>saml</module>
|
<module>saml</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
+50
-50
@@ -1,50 +1,50 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-broker-saml</artifactId>
|
<artifactId>keycloak-broker-saml</artifactId>
|
||||||
<name>Keycloak Broker - SAML Identity Provider</name>
|
<name>Keycloak Broker - SAML Identity Provider</name>
|
||||||
<description/>
|
<description/>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-broker-core</artifactId>
|
<artifactId>keycloak-broker-core</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-saml-protocol</artifactId>
|
<artifactId>keycloak-saml-protocol</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-saml-core</artifactId>
|
<artifactId>keycloak-saml-core</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-services</artifactId>
|
<artifactId>keycloak-services</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-events-api</artifactId>
|
<artifactId>keycloak-events-api</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.logging</groupId>
|
<groupId>org.jboss.logging</groupId>
|
||||||
<artifactId>jboss-logging</artifactId>
|
<artifactId>jboss-logging</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -180,10 +180,10 @@ public class SAMLEndpoint {
|
|||||||
SAMLDocumentHolder holder = extractRequestDocument(samlRequest);
|
SAMLDocumentHolder holder = extractRequestDocument(samlRequest);
|
||||||
RequestAbstractType requestAbstractType = (RequestAbstractType) holder.getSamlObject();
|
RequestAbstractType requestAbstractType = (RequestAbstractType) holder.getSamlObject();
|
||||||
// validate destination
|
// validate destination
|
||||||
if (requestAbstractType.getDestination() != null && !uriInfo.getAbsolutePath().equals(requestAbstractType.getDestination())) {
|
if (!uriInfo.getAbsolutePath().equals(requestAbstractType.getDestination())) {
|
||||||
event.event(EventType.IDENTITY_PROVIDER_RESPONSE);
|
event.event(EventType.IDENTITY_PROVIDER_RESPONSE);
|
||||||
event.detail(Details.REASON, "invalid_destination");
|
|
||||||
event.error(Errors.INVALID_SAML_RESPONSE);
|
event.error(Errors.INVALID_SAML_RESPONSE);
|
||||||
|
event.detail(Details.REASON, "invalid_destination");
|
||||||
return ErrorPage.error(session, Messages.INVALID_REQUEST);
|
return ErrorPage.error(session, Messages.INVALID_REQUEST);
|
||||||
}
|
}
|
||||||
if (config.isValidateSignature()) {
|
if (config.isValidateSignature()) {
|
||||||
@@ -215,9 +215,6 @@ public class SAMLEndpoint {
|
|||||||
if (request.getSessionIndex() == null || request.getSessionIndex().isEmpty()) {
|
if (request.getSessionIndex() == null || request.getSessionIndex().isEmpty()) {
|
||||||
List<UserSessionModel> userSessions = session.sessions().getUserSessionByBrokerUserId(realm, brokerUserId);
|
List<UserSessionModel> userSessions = session.sessions().getUserSessionByBrokerUserId(realm, brokerUserId);
|
||||||
for (UserSessionModel userSession : userSessions) {
|
for (UserSessionModel userSession : userSessions) {
|
||||||
if (userSession.getState() == UserSessionModel.State.LOGGING_OUT || userSession.getState() == UserSessionModel.State.LOGGED_OUT) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
AuthenticationManager.backchannelLogout(session, realm, userSession, uriInfo, clientConnection, headers, false);
|
AuthenticationManager.backchannelLogout(session, realm, userSession, uriInfo, clientConnection, headers, false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -230,9 +227,6 @@ public class SAMLEndpoint {
|
|||||||
String brokerSessionId = brokerUserId + "." + sessionIndex;
|
String brokerSessionId = brokerUserId + "." + sessionIndex;
|
||||||
UserSessionModel userSession = session.sessions().getUserSessionByBrokerSessionId(realm, brokerSessionId);
|
UserSessionModel userSession = session.sessions().getUserSessionByBrokerSessionId(realm, brokerSessionId);
|
||||||
if (userSession != null) {
|
if (userSession != null) {
|
||||||
if (userSession.getState() == UserSessionModel.State.LOGGING_OUT || userSession.getState() == UserSessionModel.State.LOGGED_OUT) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
AuthenticationManager.backchannelLogout(session, realm, userSession, uriInfo, clientConnection, headers, false);
|
AuthenticationManager.backchannelLogout(session, realm, userSession, uriInfo, clientConnection, headers, false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -354,10 +348,10 @@ public class SAMLEndpoint {
|
|||||||
SAMLDocumentHolder holder = extractResponseDocument(samlResponse);
|
SAMLDocumentHolder holder = extractResponseDocument(samlResponse);
|
||||||
StatusResponseType statusResponse = (StatusResponseType)holder.getSamlObject();
|
StatusResponseType statusResponse = (StatusResponseType)holder.getSamlObject();
|
||||||
// validate destination
|
// validate destination
|
||||||
if (statusResponse.getDestination() != null && !uriInfo.getAbsolutePath().toString().equals(statusResponse.getDestination())) {
|
if (!uriInfo.getAbsolutePath().toString().equals(statusResponse.getDestination())) {
|
||||||
event.event(EventType.IDENTITY_PROVIDER_RESPONSE);
|
event.event(EventType.IDENTITY_PROVIDER_RESPONSE);
|
||||||
event.detail(Details.REASON, "invalid_destination");
|
|
||||||
event.error(Errors.INVALID_SAML_RESPONSE);
|
event.error(Errors.INVALID_SAML_RESPONSE);
|
||||||
|
event.detail(Details.REASON, "invalid_destination");
|
||||||
return ErrorPage.error(session, Messages.INVALID_FEDERATED_IDENTITY_ACTION);
|
return ErrorPage.error(session, Messages.INVALID_FEDERATED_IDENTITY_ACTION);
|
||||||
}
|
}
|
||||||
if (config.isValidateSignature()) {
|
if (config.isValidateSignature()) {
|
||||||
|
|||||||
@@ -18,17 +18,13 @@
|
|||||||
package org.keycloak.broker.saml;
|
package org.keycloak.broker.saml;
|
||||||
|
|
||||||
import org.keycloak.broker.provider.AbstractIdentityProviderFactory;
|
import org.keycloak.broker.provider.AbstractIdentityProviderFactory;
|
||||||
import org.keycloak.broker.saml.mappers.UsernameTemplateMapper;
|
|
||||||
import org.keycloak.dom.saml.v2.metadata.EndpointType;
|
import org.keycloak.dom.saml.v2.metadata.EndpointType;
|
||||||
import org.keycloak.dom.saml.v2.metadata.EntitiesDescriptorType;
|
import org.keycloak.dom.saml.v2.metadata.EntitiesDescriptorType;
|
||||||
import org.keycloak.dom.saml.v2.metadata.EntityDescriptorType;
|
import org.keycloak.dom.saml.v2.metadata.EntityDescriptorType;
|
||||||
import org.keycloak.dom.saml.v2.metadata.IDPSSODescriptorType;
|
import org.keycloak.dom.saml.v2.metadata.IDPSSODescriptorType;
|
||||||
import org.keycloak.dom.saml.v2.metadata.KeyDescriptorType;
|
import org.keycloak.dom.saml.v2.metadata.KeyDescriptorType;
|
||||||
import org.keycloak.dom.saml.v2.metadata.KeyTypes;
|
import org.keycloak.dom.saml.v2.metadata.KeyTypes;
|
||||||
import org.keycloak.models.IdentityProviderMapperModel;
|
|
||||||
import org.keycloak.models.IdentityProviderModel;
|
import org.keycloak.models.IdentityProviderModel;
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
import org.keycloak.saml.common.constants.JBossSAMLURIConstants;
|
import org.keycloak.saml.common.constants.JBossSAMLURIConstants;
|
||||||
import org.keycloak.saml.common.exceptions.ParsingException;
|
import org.keycloak.saml.common.exceptions.ParsingException;
|
||||||
import org.keycloak.saml.common.util.DocumentUtil;
|
import org.keycloak.saml.common.util.DocumentUtil;
|
||||||
@@ -154,5 +150,4 @@ public class SAMLIdentityProviderFactory extends AbstractIdentityProviderFactory
|
|||||||
public String getId() {
|
public String getId() {
|
||||||
return PROVIDER_ID;
|
return PROVIDER_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
-133
@@ -1,133 +0,0 @@
|
|||||||
package org.keycloak.broker.saml.mappers;
|
|
||||||
|
|
||||||
import org.keycloak.broker.provider.AbstractIdentityProviderMapper;
|
|
||||||
import org.keycloak.broker.provider.BrokeredIdentityContext;
|
|
||||||
import org.keycloak.broker.saml.SAMLEndpoint;
|
|
||||||
import org.keycloak.broker.saml.SAMLIdentityProviderFactory;
|
|
||||||
import org.keycloak.dom.saml.v2.assertion.AssertionType;
|
|
||||||
import org.keycloak.dom.saml.v2.assertion.AttributeStatementType;
|
|
||||||
import org.keycloak.dom.saml.v2.assertion.AttributeType;
|
|
||||||
import org.keycloak.dom.saml.v2.assertion.NameIDType;
|
|
||||||
import org.keycloak.dom.saml.v2.assertion.SubjectType;
|
|
||||||
import org.keycloak.models.IdentityProviderMapperModel;
|
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
import org.keycloak.models.UserModel;
|
|
||||||
import org.keycloak.models.utils.KeycloakModelUtils;
|
|
||||||
import org.keycloak.provider.ProviderConfigProperty;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class UsernameTemplateMapper extends AbstractIdentityProviderMapper {
|
|
||||||
|
|
||||||
public static final String[] COMPATIBLE_PROVIDERS = {SAMLIdentityProviderFactory.PROVIDER_ID};
|
|
||||||
|
|
||||||
private static final List<ProviderConfigProperty> configProperties = new ArrayList<ProviderConfigProperty>();
|
|
||||||
|
|
||||||
public static final String TEMPLATE = "template";
|
|
||||||
|
|
||||||
static {
|
|
||||||
ProviderConfigProperty property;
|
|
||||||
property = new ProviderConfigProperty();
|
|
||||||
property.setName(TEMPLATE);
|
|
||||||
property.setLabel("Template");
|
|
||||||
property.setHelpText("Template to use to format the username to import. Substitutions are enclosed in ${}. For example: '${ALIAS}.${NAMEID}'. ALIAS is the provider alias. NAMEID is that SAML name id assertion. ATTRIBUTE.<NAME> references a SAML attribute where name is the attribute name or friendly name.");
|
|
||||||
property.setType(ProviderConfigProperty.STRING_TYPE);
|
|
||||||
property.setDefaultValue("${ALIAS}.${NAMEID}");
|
|
||||||
configProperties.add(property);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final String PROVIDER_ID = "saml-username-idp-mapper";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ProviderConfigProperty> getConfigProperties() {
|
|
||||||
return configProperties;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getId() {
|
|
||||||
return PROVIDER_ID;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getCompatibleProviders() {
|
|
||||||
return COMPATIBLE_PROVIDERS;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDisplayCategory() {
|
|
||||||
return "Preprocessor";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDisplayType() {
|
|
||||||
return "Username Template Importer";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
|
|
||||||
}
|
|
||||||
static Pattern substitution = Pattern.compile("\\$\\{([^}]+)\\}");
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void preprocessFederatedIdentity(KeycloakSession session, RealmModel realm, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
|
|
||||||
AssertionType assertion = (AssertionType)context.getContextData().get(SAMLEndpoint.SAML_ASSERTION);
|
|
||||||
String template = mapperModel.getConfig().get(TEMPLATE);
|
|
||||||
Matcher m = substitution.matcher(template);
|
|
||||||
StringBuffer sb = new StringBuffer();
|
|
||||||
while (m.find()) {
|
|
||||||
String variable = m.group(1);
|
|
||||||
if (variable.equals("ALIAS")) {
|
|
||||||
m.appendReplacement(sb, context.getIdpConfig().getAlias());
|
|
||||||
} else if (variable.equals("UUID")) {
|
|
||||||
m.appendReplacement(sb, KeycloakModelUtils.generateId());
|
|
||||||
} else if (variable.equals("NAMEID")) {
|
|
||||||
SubjectType subject = assertion.getSubject();
|
|
||||||
SubjectType.STSubType subType = subject.getSubType();
|
|
||||||
NameIDType subjectNameID = (NameIDType) subType.getBaseID();
|
|
||||||
m.appendReplacement(sb, subjectNameID.getValue());
|
|
||||||
} else if (variable.startsWith("ATTRIBUTE.")) {
|
|
||||||
String name = variable.substring("ATTRIBUTE.".length());
|
|
||||||
String value = "";
|
|
||||||
for (AttributeStatementType statement : assertion.getAttributeStatements()) {
|
|
||||||
for (AttributeStatementType.ASTChoiceType choice : statement.getAttributes()) {
|
|
||||||
AttributeType attr = choice.getAttribute();
|
|
||||||
if (name.equals(attr.getName()) || name.equals(attr.getFriendlyName())) {
|
|
||||||
List<Object> attributeValue = attr.getAttributeValue();
|
|
||||||
if (attributeValue != null && !attributeValue.isEmpty()) {
|
|
||||||
value = attributeValue.get(0).toString();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m.appendReplacement(sb, value);
|
|
||||||
} else {
|
|
||||||
m.appendReplacement(sb, m.group(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
m.appendTail(sb);
|
|
||||||
context.setModelUsername(sb.toString());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHelpText() {
|
|
||||||
return "Format the username to import.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+1
-2
@@ -1,3 +1,2 @@
|
|||||||
org.keycloak.broker.saml.mappers.AttributeToRoleMapper
|
org.keycloak.broker.saml.mappers.AttributeToRoleMapper
|
||||||
org.keycloak.broker.saml.mappers.UserAttributeMapper
|
org.keycloak.broker.saml.mappers.UserAttributeMapper
|
||||||
org.keycloak.broker.saml.mappers.UsernameTemplateMapper
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ import org.keycloak.provider.Spi;
|
|||||||
*/
|
*/
|
||||||
public class FileConnectionSpi implements Spi {
|
public class FileConnectionSpi implements Spi {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "connectionsFile";
|
return "connectionsFile";
|
||||||
|
|||||||
@@ -1,36 +1,36 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-connections-http-client</artifactId>
|
<artifactId>keycloak-connections-http-client</artifactId>
|
||||||
<name>Keycloak Connections Apache HttpClient</name>
|
<name>Keycloak Connections Apache HttpClient</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-model-api</artifactId>
|
<artifactId>keycloak-model-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.logging</groupId>
|
<groupId>org.jboss.logging</groupId>
|
||||||
<artifactId>jboss-logging</artifactId>
|
<artifactId>jboss-logging</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
-5
@@ -9,11 +9,6 @@ import org.keycloak.provider.Spi;
|
|||||||
*/
|
*/
|
||||||
public class HttpClientSpi implements Spi {
|
public class HttpClientSpi implements Spi {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "connectionsHttpClient";
|
return "connectionsHttpClient";
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-connections-infinispan</artifactId>
|
<artifactId>keycloak-connections-infinispan</artifactId>
|
||||||
<name>Keycloak Connections Infinispan</name>
|
<name>Keycloak Connections Infinispan</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-model-api</artifactId>
|
<artifactId>keycloak-model-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.infinispan</groupId>
|
<groupId>org.infinispan</groupId>
|
||||||
<artifactId>infinispan-core</artifactId>
|
<artifactId>infinispan-core</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
-5
@@ -9,11 +9,6 @@ import org.keycloak.provider.Spi;
|
|||||||
*/
|
*/
|
||||||
public class InfinispanConnectionSpi implements Spi {
|
public class InfinispanConnectionSpi implements Spi {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "connectionsInfinispan";
|
return "connectionsInfinispan";
|
||||||
|
|||||||
@@ -1,76 +1,76 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-connections-jpa-liquibase</artifactId>
|
<artifactId>keycloak-connections-jpa-liquibase</artifactId>
|
||||||
<name>Keycloak Connections JPA Liquibase Updater</name>
|
<name>Keycloak Connections JPA Liquibase Updater</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-connections-jpa</artifactId>
|
<artifactId>keycloak-connections-jpa</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-model-api</artifactId>
|
<artifactId>keycloak-model-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.liquibase</groupId>
|
<groupId>org.liquibase</groupId>
|
||||||
<artifactId>liquibase-core</artifactId>
|
<artifactId>liquibase-core</artifactId>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.yaml</groupId>
|
<groupId>org.yaml</groupId>
|
||||||
<artifactId>snakeyaml</artifactId>
|
<artifactId>snakeyaml</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.logging</groupId>
|
<groupId>org.jboss.logging</groupId>
|
||||||
<artifactId>jboss-logging</artifactId>
|
<artifactId>jboss-logging</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-services</artifactId>
|
<artifactId>keycloak-services</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.liquibase</groupId>
|
<groupId>org.liquibase</groupId>
|
||||||
<artifactId>liquibase-maven-plugin</artifactId>
|
<artifactId>liquibase-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<changeLogFile>META-INF/jpa-changelog-master.xml</changeLogFile>
|
<changeLogFile>META-INF/jpa-changelog-master.xml</changeLogFile>
|
||||||
|
|
||||||
<url>${project.url}</url>
|
<url>${url}</url>
|
||||||
<driver>${driver}</driver>
|
<driver>${driver}</driver>
|
||||||
<username>${username}</username>
|
<username>${username}</username>
|
||||||
<password>${password}</password>
|
<password>${password}</password>
|
||||||
|
|
||||||
<referenceUrl>${referenceUrl}</referenceUrl>
|
<referenceUrl>${referenceUrl}</referenceUrl>
|
||||||
<referenceDriver>${driver}</referenceDriver>
|
<referenceDriver>${driver}</referenceDriver>
|
||||||
<referenceUsername>${username}</referenceUsername>
|
<referenceUsername>${username}</referenceUsername>
|
||||||
<referencePassword>${password}</referencePassword>
|
<referencePassword>${password}</referencePassword>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<username>sa</username>
|
<username>sa</username>
|
||||||
<password></password>
|
<password></password>
|
||||||
<driver>org.h2.Driver</driver>
|
<driver>org.h2.Driver</driver>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
+1
-4
@@ -3,7 +3,6 @@ package org.keycloak.connections.jpa.updater.liquibase.custom;
|
|||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
|
||||||
import liquibase.datatype.DataTypeFactory;
|
|
||||||
import liquibase.exception.CustomChangeException;
|
import liquibase.exception.CustomChangeException;
|
||||||
import liquibase.statement.core.InsertStatement;
|
import liquibase.statement.core.InsertStatement;
|
||||||
import liquibase.structure.core.Table;
|
import liquibase.structure.core.Table;
|
||||||
@@ -18,9 +17,7 @@ public class JpaUpdate1_2_0_CR1 extends CustomKeycloakTask {
|
|||||||
String realmClientTableName = database.correctObjectName("REALM_CLIENT", Table.class);
|
String realmClientTableName = database.correctObjectName("REALM_CLIENT", Table.class);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String trueValue = DataTypeFactory.getInstance().getTrueBooleanValue(database);
|
PreparedStatement statement = jdbcConnection.prepareStatement("select CLIENT.REALM_ID, CLIENT.ID CLIENT_ID from CLIENT where CLIENT.CONSENT_REQUIRED = true");
|
||||||
PreparedStatement statement = jdbcConnection.prepareStatement("select CLIENT.REALM_ID, CLIENT.ID CLIENT_ID from CLIENT where CLIENT.CONSENT_REQUIRED = " + trueValue);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ResultSet resultSet = statement.executeQuery();
|
ResultSet resultSet = statement.executeQuery();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,200 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
|
||||||
<changeSet author="bburke@redhat.com" id="1.3.0">
|
|
||||||
<delete tableName="CLIENT_SESSION_ROLE"/>
|
|
||||||
<delete tableName="CLIENT_SESSION_PROT_MAPPER"/>
|
|
||||||
<delete tableName="CLIENT_SESSION_NOTE"/>
|
|
||||||
<delete tableName="CLIENT_SESSION"/>
|
|
||||||
<delete tableName="USER_SESSION_NOTE"/>
|
|
||||||
<delete tableName="USER_SESSION"/>
|
|
||||||
<createTable tableName="ADMIN_EVENT_ENTITY">
|
|
||||||
<column name="ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="ADMIN_EVENT_TIME" type="BIGINT"/>
|
|
||||||
<column name="REALM_ID" type="VARCHAR(255)"/>
|
|
||||||
<column name="OPERATION_TYPE" type="VARCHAR(255)"/>
|
|
||||||
<column name="AUTH_REALM_ID" type="VARCHAR(255)"/>
|
|
||||||
<column name="AUTH_CLIENT_ID" type="VARCHAR(255)"/>
|
|
||||||
<column name="AUTH_USER_ID" type="VARCHAR(255)"/>
|
|
||||||
<column name="IP_ADDRESS" type="VARCHAR(255)"/>
|
|
||||||
<column name="RESOURCE_PATH" type="VARCHAR(2550)"/>
|
|
||||||
<column name="REPRESENTATION" type="TEXT(25500)"/>
|
|
||||||
<column name="ERROR" type="VARCHAR(255)"/>
|
|
||||||
</createTable>
|
|
||||||
<createTable tableName="AUTHENTICATOR">
|
|
||||||
<column name="ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="ALIAS" type="VARCHAR(255)"/>
|
|
||||||
<column name="REALM_ID" type="VARCHAR(36)"/>
|
|
||||||
<column name="PROVIDER_ID" type="VARCHAR(255)"/>
|
|
||||||
</createTable>
|
|
||||||
<createTable tableName="AUTHENTICATION_FLOW">
|
|
||||||
<column name="ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="ALIAS" type="VARCHAR(255)"/>
|
|
||||||
<column name="DESCRIPTION" type="VARCHAR(255)"/>
|
|
||||||
<column name="REALM_ID" type="VARCHAR(36)"/>
|
|
||||||
</createTable>
|
|
||||||
<createTable tableName="AUTHENTICATION_EXECUTION">
|
|
||||||
<column name="ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="ALIAS" type="VARCHAR(255)"/>
|
|
||||||
<column name="AUTHENTICATOR" type="VARCHAR(36)"/>
|
|
||||||
<column name="REALM_ID" type="VARCHAR(36)"/>
|
|
||||||
<column name="FLOW_ID" type="VARCHAR(36)"/>
|
|
||||||
<column name="REQUIREMENT" type="INT"/>
|
|
||||||
<column name="PRIORITY" type="INT"/>
|
|
||||||
<column name="USER_SETUP_ALLOWED" type="BOOLEAN" defaultValueBoolean="false">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="AUTHENTICATOR_FLOW" type="BOOLEAN" defaultValueBoolean="false">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
</createTable>
|
|
||||||
<createTable tableName="AUTHENTICATOR_CONFIG">
|
|
||||||
<column name="AUTHENTICATOR_ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="VALUE" type="CLOB"/>
|
|
||||||
<column name="NAME" type="VARCHAR(255)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
</createTable>
|
|
||||||
<createTable tableName="USER_FEDERATION_MAPPER">
|
|
||||||
<column name="ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="NAME" type="VARCHAR(255)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="FEDERATION_PROVIDER_ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="FEDERATION_MAPPER_TYPE" type="VARCHAR(255)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="REALM_ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
</createTable>
|
|
||||||
<createTable tableName="USER_FEDERATION_MAPPER_CONFIG">
|
|
||||||
<column name="USER_FEDERATION_MAPPER_ID" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="VALUE" type="VARCHAR(255)"/>
|
|
||||||
<column name="NAME" type="VARCHAR(255)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
</createTable>
|
|
||||||
|
|
||||||
<addColumn tableName="REALM">
|
|
||||||
<column name="ADMIN_EVENTS_ENABLED" type="BOOLEAN" defaultValueBoolean="false">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="ADMIN_EVENTS_DETAILS_ENABLED" type="BOOLEAN" defaultValueBoolean="false">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="EDIT_USERNAME_ALLOWED" type="BOOLEAN" defaultValueBoolean="false">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
</addColumn>
|
|
||||||
<createTable tableName="CLIENT_SESSION_AUTH_STATUS">
|
|
||||||
<column name="AUTHENTICATOR" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="STATUS" type="INT"/>
|
|
||||||
<column name="CLIENT_SESSION" type="VARCHAR(36)">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
</createTable>
|
|
||||||
<addColumn tableName="CLIENT_SESSION">
|
|
||||||
<column name="AUTH_USER_ID" type="VARCHAR(36)"/>
|
|
||||||
</addColumn>
|
|
||||||
<addColumn tableName="IDENTITY_PROVIDER">
|
|
||||||
<column name="TRUST_EMAIL" type="BOOLEAN" defaultValueBoolean="false">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
<column name="UPDATE_PROFILE_FIRST_LGN_MD" type="VARCHAR(255)" defaultValue="on">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
</addColumn>
|
|
||||||
<!-- migrate value from UPDATE_PROFILE_FIRST_LOGIN to UPDATE_PROFILE_FIRST_LGN_MD then drop it -->
|
|
||||||
<update tableName="IDENTITY_PROVIDER">
|
|
||||||
<column name="UPDATE_PROFILE_FIRST_LGN_MD" value="off"/>
|
|
||||||
<where>UPDATE_PROFILE_FIRST_LOGIN = :value</where>
|
|
||||||
<whereParams>
|
|
||||||
<param valueBoolean="false" />
|
|
||||||
</whereParams>
|
|
||||||
</update>
|
|
||||||
<dropDefaultValue tableName="IDENTITY_PROVIDER" columnName="UPDATE_PROFILE_FIRST_LOGIN" />
|
|
||||||
<dropColumn tableName="IDENTITY_PROVIDER" columnName="UPDATE_PROFILE_FIRST_LOGIN"/>
|
|
||||||
|
|
||||||
<addColumn tableName="USER_REQUIRED_ACTION">
|
|
||||||
<column name="REQUIRED_ACTION" type="VARCHAR(255)" defaultValue=" ">
|
|
||||||
<constraints nullable="false"/>
|
|
||||||
</column>
|
|
||||||
</addColumn>
|
|
||||||
<!-- VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD -->
|
|
||||||
<update tableName="USER_REQUIRED_ACTION">
|
|
||||||
<column name="REQUIRED_ACTION" value="VERIFY_EMAIL"/>
|
|
||||||
<where>ACTION = 0</where>
|
|
||||||
</update>
|
|
||||||
<update tableName="USER_REQUIRED_ACTION">
|
|
||||||
<column name="REQUIRED_ACTION" value="UPDATE_PROFILE"/>
|
|
||||||
<where>ACTION = 1</where>
|
|
||||||
</update>
|
|
||||||
<update tableName="USER_REQUIRED_ACTION">
|
|
||||||
<column name="REQUIRED_ACTION" value="CONFIGURE_TOTP"/>
|
|
||||||
<where>ACTION = 2</where>
|
|
||||||
</update>
|
|
||||||
<update tableName="USER_REQUIRED_ACTION">
|
|
||||||
<column name="REQUIRED_ACTION" value="UPDATE_PASSWORD"/>
|
|
||||||
<where>ACTION = 3</where>
|
|
||||||
</update>
|
|
||||||
<addPrimaryKey columnNames="ID" constraintName="CONSTRAINT_AUTH_PK" tableName="AUTHENTICATOR"/>
|
|
||||||
<addPrimaryKey columnNames="ID" constraintName="CONSTRAINT_AUTH_FLOW_PK" tableName="AUTHENTICATION_FLOW"/>
|
|
||||||
<addPrimaryKey columnNames="ID" constraintName="CONSTRAINT_AUTH_EXEC_PK" tableName="AUTHENTICATION_EXECUTION"/>
|
|
||||||
<addPrimaryKey columnNames="AUTHENTICATOR_ID, NAME" constraintName="CONSTRAINT_AUTH_CFG_PK" tableName="AUTHENTICATOR_CONFIG"/>
|
|
||||||
<dropPrimaryKey constraintName="CONSTRAINT_2" tableName="USER_REQUIRED_ACTION"/>
|
|
||||||
<dropColumn tableName="USER_REQUIRED_ACTION" columnName="ACTION"/>
|
|
||||||
<addPrimaryKey columnNames="REQUIRED_ACTION, USER_ID" constraintName="CONSTRAINT_REQUIRED_ACTION" tableName="USER_REQUIRED_ACTION"/>
|
|
||||||
<addPrimaryKey columnNames="CLIENT_SESSION, AUTHENTICATOR" constraintName="CONSTRAINT_AUTH_STATUS_PK" tableName="CLIENT_SESSION_AUTH_STATUS"/>
|
|
||||||
<addPrimaryKey columnNames="ID" constraintName="CONSTRAINT_FEDMAPPERPM" tableName="USER_FEDERATION_MAPPER"/>
|
|
||||||
<addPrimaryKey columnNames="USER_FEDERATION_MAPPER_ID, NAME" constraintName="CONSTRAINT_FEDMAPPER_CFG_PM" tableName="USER_FEDERATION_MAPPER_CONFIG"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="CLIENT_SESSION" baseTableName="CLIENT_SESSION_AUTH_STATUS" constraintName="AUTH_STATUS_CONSTRAINT" referencedColumnNames="ID" referencedTableName="CLIENT_SESSION"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="REALM_ID" baseTableName="AUTHENTICATOR" constraintName="FK_AUTH_REALM" referencedColumnNames="ID" referencedTableName="REALM"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="REALM_ID" baseTableName="AUTHENTICATION_FLOW" constraintName="FK_AUTH_FLOW_REALM" referencedColumnNames="ID" referencedTableName="REALM"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="REALM_ID" baseTableName="AUTHENTICATION_EXECUTION" constraintName="FK_AUTH_EXEC_REALM" referencedColumnNames="ID" referencedTableName="REALM"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="FLOW_ID" baseTableName="AUTHENTICATION_EXECUTION" constraintName="FK_AUTH_EXEC_FLOW" referencedColumnNames="ID" referencedTableName="AUTHENTICATION_FLOW"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="REALM_ID" baseTableName="USER_FEDERATION_MAPPER" constraintName="FK_FEDMAPPERPM_REALM" referencedColumnNames="ID" referencedTableName="REALM"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="FEDERATION_PROVIDER_ID" baseTableName="USER_FEDERATION_MAPPER" constraintName="FK_FEDMAPPERPM_FEDPRV" referencedColumnNames="ID" referencedTableName="USER_FEDERATION_PROVIDER"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="USER_FEDERATION_MAPPER_ID" baseTableName="USER_FEDERATION_MAPPER_CONFIG" constraintName="FK_FEDMAPPER_CFG" referencedColumnNames="ID" referencedTableName="USER_FEDERATION_MAPPER"/>
|
|
||||||
|
|
||||||
<dropDefaultValue tableName="REALM" columnName="PASSWORD_CRED_GRANT_ALLOWED" />
|
|
||||||
<dropColumn tableName="REALM" columnName="PASSWORD_CRED_GRANT_ALLOWED"/>
|
|
||||||
|
|
||||||
<!-- KEYCLOAK-1298 Change constraint names to be upper-cased -->
|
|
||||||
<dropForeignKeyConstraint baseTableName="PROTOCOL_MAPPER_CONFIG" constraintName="FK_PMConfig" />
|
|
||||||
<dropPrimaryKey constraintName="CONSTRAINT_PMConfig" tableName="PROTOCOL_MAPPER_CONFIG"/>
|
|
||||||
<addPrimaryKey columnNames="PROTOCOL_MAPPER_ID, NAME" constraintName="CONSTRAINT_PMCONFIG" tableName="PROTOCOL_MAPPER_CONFIG"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="PROTOCOL_MAPPER_ID" baseTableName="PROTOCOL_MAPPER_CONFIG" constraintName="FK_PMCONFIG" referencedColumnNames="ID" referencedTableName="PROTOCOL_MAPPER"/>
|
|
||||||
|
|
||||||
<dropForeignKeyConstraint baseTableName="IDP_MAPPER_CONFIG" constraintName="FK_IDPMConfig" />
|
|
||||||
<dropPrimaryKey constraintName="CONSTRAINT_IDPMConfig" tableName="IDP_MAPPER_CONFIG"/>
|
|
||||||
<addPrimaryKey columnNames="IDP_MAPPER_ID, NAME" constraintName="CONSTRAINT_IDPMCONFIG" tableName="IDP_MAPPER_CONFIG"/>
|
|
||||||
<addForeignKeyConstraint baseColumnNames="IDP_MAPPER_ID" baseTableName="IDP_MAPPER_CONFIG" constraintName="FK_IDPMCONFIG" referencedColumnNames="ID" referencedTableName="IDENTITY_PROVIDER_MAPPER"/>
|
|
||||||
|
|
||||||
<!-- Sybase specific hacks -->
|
|
||||||
<modifySql dbms="sybase">
|
|
||||||
<replace replace="[USER_REQUIRED_ACTION] DROP PRIMARY KEY" with="[USER_REQUIRED_ACTION] DROP CONSTRAINT CONSTRAINT_2" />
|
|
||||||
<replace replace="[PROTOCOL_MAPPER_CONFIG] DROP PRIMARY KEY" with="[PROTOCOL_MAPPER_CONFIG] DROP CONSTRAINT CONSTRAINT_PMConfig" />
|
|
||||||
<replace replace="[IDP_MAPPER_CONFIG] DROP PRIMARY KEY" with="[IDP_MAPPER_CONFIG] DROP CONSTRAINT CONSTRAINT_IDPMConfig" />
|
|
||||||
<regExpReplace replace=".*(SET DEFAULT NULL)" with="SELECT 1" />
|
|
||||||
</modifySql>
|
|
||||||
|
|
||||||
</changeSet>
|
|
||||||
</databaseChangeLog>
|
|
||||||
@@ -6,5 +6,4 @@
|
|||||||
<include file="META-INF/jpa-changelog-1.2.0.Beta1.xml"/>
|
<include file="META-INF/jpa-changelog-1.2.0.Beta1.xml"/>
|
||||||
<include file="META-INF/jpa-changelog-1.2.0.CR1.xml"/>
|
<include file="META-INF/jpa-changelog-1.2.0.CR1.xml"/>
|
||||||
<include file="META-INF/jpa-changelog-1.2.0.Final.xml"/>
|
<include file="META-INF/jpa-changelog-1.2.0.Final.xml"/>
|
||||||
<include file="META-INF/jpa-changelog-1.3.0.xml"/>
|
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
+36
-36
@@ -1,36 +1,36 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-connections-jpa</artifactId>
|
<artifactId>keycloak-connections-jpa</artifactId>
|
||||||
<name>Keycloak Connections JPA</name>
|
<name>Keycloak Connections JPA</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-model-api</artifactId>
|
<artifactId>keycloak-model-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate.javax.persistence</groupId>
|
<groupId>org.hibernate.javax.persistence</groupId>
|
||||||
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
<artifactId>hibernate-entitymanager</artifactId>
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@@ -9,11 +9,6 @@ import org.keycloak.provider.Spi;
|
|||||||
*/
|
*/
|
||||||
public class JpaConnectionSpi implements Spi {
|
public class JpaConnectionSpi implements Spi {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "connectionsJpa";
|
return "connectionsJpa";
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ public interface JpaUpdaterProvider extends Provider {
|
|||||||
|
|
||||||
public String FIRST_VERSION = "1.0.0.Final";
|
public String FIRST_VERSION = "1.0.0.Final";
|
||||||
|
|
||||||
public String LAST_VERSION = "1.3.0.Beta1";
|
public String LAST_VERSION = "1.2.0.RC1";
|
||||||
|
|
||||||
public String getCurrentVersionSql();
|
public String getCurrentVersionSql();
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ import org.keycloak.provider.Spi;
|
|||||||
*/
|
*/
|
||||||
public class JpaUpdaterSpi implements Spi {
|
public class JpaUpdaterSpi implements Spi {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "connectionsJpaUpdater";
|
return "connectionsJpaUpdater";
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
<class>org.keycloak.models.jpa.entities.RealmAttributeEntity</class>
|
<class>org.keycloak.models.jpa.entities.RealmAttributeEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.UserFederationProviderEntity</class>
|
<class>org.keycloak.models.jpa.entities.UserFederationProviderEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.UserFederationMapperEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RoleEntity</class>
|
<class>org.keycloak.models.jpa.entities.RoleEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.FederatedIdentityEntity</class>
|
<class>org.keycloak.models.jpa.entities.FederatedIdentityEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.MigrationModelEntity</class>
|
<class>org.keycloak.models.jpa.entities.MigrationModelEntity</class>
|
||||||
@@ -25,24 +24,19 @@
|
|||||||
<class>org.keycloak.models.jpa.entities.UserConsentEntity</class>
|
<class>org.keycloak.models.jpa.entities.UserConsentEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.UserConsentRoleEntity</class>
|
<class>org.keycloak.models.jpa.entities.UserConsentRoleEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.UserConsentProtocolMapperEntity</class>
|
<class>org.keycloak.models.jpa.entities.UserConsentProtocolMapperEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.AuthenticationFlowEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.AuthenticationExecutionEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.AuthenticatorEntity</class>
|
|
||||||
|
|
||||||
<!-- JpaUserSessionProvider -->
|
<!-- JpaUserSessionProvider -->
|
||||||
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionEntity</class>
|
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionEntity</class>
|
||||||
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionRoleEntity</class>
|
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionRoleEntity</class>
|
||||||
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionAuthStatusEntity</class>
|
|
||||||
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionProtocolMapperEntity</class>
|
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionProtocolMapperEntity</class>
|
||||||
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionNoteEntity</class>
|
<class>org.keycloak.models.sessions.jpa.entities.ClientSessionNoteEntity</class>
|
||||||
<class>org.keycloak.models.sessions.jpa.entities.UserSessionNoteEntity</class>
|
<class>org.keycloak.models.sessions.jpa.entities.UserSessionNoteEntity</class>
|
||||||
<class>org.keycloak.models.sessions.jpa.entities.UserSessionEntity</class>
|
<class>org.keycloak.models.sessions.jpa.entities.UserSessionEntity</class>
|
||||||
<class>org.keycloak.models.sessions.jpa.entities.UsernameLoginFailureEntity</class>
|
<class>org.keycloak.models.sessions.jpa.entities.UsernameLoginFailureEntity</class>
|
||||||
|
|
||||||
<!-- JpaAuditProviders -->
|
<!-- JpaAuditProvider -->
|
||||||
<class>org.keycloak.events.jpa.EventEntity</class>
|
<class>org.keycloak.events.jpa.EventEntity</class>
|
||||||
<class>org.keycloak.events.jpa.AdminEventEntity</class>
|
|
||||||
|
|
||||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
+6
-3
@@ -6,7 +6,11 @@ import com.mongodb.DBCollection;
|
|||||||
import com.mongodb.DBCursor;
|
import com.mongodb.DBCursor;
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
import org.keycloak.connections.mongo.updater.MongoUpdaterProvider;
|
import org.keycloak.connections.mongo.updater.MongoUpdaterProvider;
|
||||||
import org.keycloak.connections.mongo.updater.impl.updates.*;
|
import org.keycloak.connections.mongo.updater.impl.updates.Update;
|
||||||
|
import org.keycloak.connections.mongo.updater.impl.updates.Update1_0_0_Final;
|
||||||
|
import org.keycloak.connections.mongo.updater.impl.updates.Update1_1_0_Beta1;
|
||||||
|
import org.keycloak.connections.mongo.updater.impl.updates.Update1_2_0_Beta1;
|
||||||
|
import org.keycloak.connections.mongo.updater.impl.updates.Update1_2_0_CR1;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -26,8 +30,7 @@ public class DefaultMongoUpdaterProvider implements MongoUpdaterProvider {
|
|||||||
Update1_0_0_Final.class,
|
Update1_0_0_Final.class,
|
||||||
Update1_1_0_Beta1.class,
|
Update1_1_0_Beta1.class,
|
||||||
Update1_2_0_Beta1.class,
|
Update1_2_0_Beta1.class,
|
||||||
Update1_2_0_CR1.class,
|
Update1_2_0_CR1.class
|
||||||
Update1_3_0.class
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
-4
@@ -53,10 +53,6 @@ public abstract class Update {
|
|||||||
log.debugv("Deleted entries from {0}", collection);
|
log.debugv("Deleted entries from {0}", collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void removeField(String collection, String field) {
|
|
||||||
db.getCollection(collection).update(new BasicDBObject(), new BasicDBObject("$unset" , new BasicDBObject(field, 1)), false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void renameCollection(String collection, String newName) {
|
protected void renameCollection(String collection, String newName) {
|
||||||
db.getCollection(collection).rename(newName);
|
db.getCollection(collection).rename(newName);
|
||||||
}
|
}
|
||||||
|
|||||||
-59
@@ -1,59 +0,0 @@
|
|||||||
package org.keycloak.connections.mongo.updater.impl.updates;
|
|
||||||
|
|
||||||
import com.mongodb.BasicDBList;
|
|
||||||
import com.mongodb.BasicDBObject;
|
|
||||||
import com.mongodb.DBCollection;
|
|
||||||
import com.mongodb.DBCursor;
|
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.representations.idm.IdentityProviderRepresentation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
|
|
||||||
*/
|
|
||||||
public class Update1_3_0 extends Update {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getId() {
|
|
||||||
return "1.3.0";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void update(KeycloakSession session) {
|
|
||||||
deleteEntries("clientSessions");
|
|
||||||
deleteEntries("sessions");
|
|
||||||
|
|
||||||
removeField("realms", "passwordCredentialGrantAllowed");
|
|
||||||
|
|
||||||
updateIdentityProviders();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateIdentityProviders() {
|
|
||||||
DBCollection realms = db.getCollection("realms");
|
|
||||||
DBCursor realmsCursor = realms.find();
|
|
||||||
|
|
||||||
try {
|
|
||||||
while (realmsCursor.hasNext()) {
|
|
||||||
BasicDBObject realm = (BasicDBObject) realmsCursor.next();
|
|
||||||
|
|
||||||
BasicDBList identityProviders = (BasicDBList) realm.get("identityProviders");
|
|
||||||
if (identityProviders != null) {
|
|
||||||
for (Object ipObj : identityProviders) {
|
|
||||||
BasicDBObject identityProvider = (BasicDBObject) ipObj;
|
|
||||||
|
|
||||||
boolean updateProfileFirstLogin = identityProvider.getBoolean("updateProfileFirstLogin");
|
|
||||||
String upflMode = updateProfileFirstLogin ? IdentityProviderRepresentation.UPFLM_ON : IdentityProviderRepresentation.UPFLM_OFF;
|
|
||||||
identityProvider.put("updateProfileFirstLoginMode", upflMode);
|
|
||||||
identityProvider.removeField("updateProfileFirstLogin");
|
|
||||||
|
|
||||||
identityProvider.put("trustEmail", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
realms.save(realm);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
realmsCursor.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+35
-35
@@ -1,35 +1,35 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-connections-mongo</artifactId>
|
<artifactId>keycloak-connections-mongo</artifactId>
|
||||||
<name>Keycloak Connections Mongo</name>
|
<name>Keycloak Connections Mongo</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-model-api</artifactId>
|
<artifactId>keycloak-model-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mongodb</groupId>
|
<groupId>org.mongodb</groupId>
|
||||||
<artifactId>mongo-java-driver</artifactId>
|
<artifactId>mongo-java-driver</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.logging</groupId>
|
<groupId>org.jboss.logging</groupId>
|
||||||
<artifactId>jboss-logging</artifactId>
|
<artifactId>jboss-logging</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
+1
-5
@@ -39,14 +39,10 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro
|
|||||||
"org.keycloak.models.sessions.mongo.entities.MongoUserSessionEntity",
|
"org.keycloak.models.sessions.mongo.entities.MongoUserSessionEntity",
|
||||||
"org.keycloak.models.sessions.mongo.entities.MongoClientSessionEntity",
|
"org.keycloak.models.sessions.mongo.entities.MongoClientSessionEntity",
|
||||||
"org.keycloak.models.entities.UserFederationProviderEntity",
|
"org.keycloak.models.entities.UserFederationProviderEntity",
|
||||||
"org.keycloak.models.entities.UserFederationMapperEntity",
|
|
||||||
"org.keycloak.models.entities.ProtocolMapperEntity",
|
"org.keycloak.models.entities.ProtocolMapperEntity",
|
||||||
"org.keycloak.models.entities.IdentityProviderMapperEntity",
|
"org.keycloak.models.entities.IdentityProviderMapperEntity",
|
||||||
"org.keycloak.models.mongo.keycloak.entities.MongoUserConsentEntity",
|
"org.keycloak.models.mongo.keycloak.entities.MongoUserConsentEntity",
|
||||||
"org.keycloak.models.mongo.keycloak.entities.MongoMigrationModelEntity",
|
"org.keycloak.models.mongo.keycloak.entities.MongoMigrationModelEntity"
|
||||||
"org.keycloak.models.entities.AuthenticationExecutionEntity",
|
|
||||||
"org.keycloak.models.entities.AuthenticationFlowEntity",
|
|
||||||
"org.keycloak.models.entities.AuthenticatorEntity",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(DefaultMongoConnectionFactoryProvider.class);
|
private static final Logger logger = Logger.getLogger(DefaultMongoConnectionFactoryProvider.class);
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ import org.keycloak.provider.Spi;
|
|||||||
*/
|
*/
|
||||||
public class MongoConnectionSpi implements Spi {
|
public class MongoConnectionSpi implements Spi {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "connectionsMongo";
|
return "connectionsMongo";
|
||||||
|
|||||||
-5
@@ -9,11 +9,6 @@ import org.keycloak.provider.Spi;
|
|||||||
*/
|
*/
|
||||||
public class MongoUpdaterSpi implements Spi {
|
public class MongoUpdaterSpi implements Spi {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInternal() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "connectionsMongoUpdater";
|
return "connectionsMongoUpdater";
|
||||||
|
|||||||
+24
-36
@@ -1,36 +1,24 @@
|
|||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<name>Connections Parent</name>
|
<name>Connections Parent</name>
|
||||||
<description/>
|
<description/>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-connections-pom</artifactId>
|
<artifactId>keycloak-connections-pom</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>jpa</module>
|
<module>jpa</module>
|
||||||
<module>jpa-liquibase</module>
|
<module>jpa-liquibase</module>
|
||||||
<module>infinispan</module>
|
<module>infinispan</module>
|
||||||
<module>mongo</module>
|
<module>mongo</module>
|
||||||
<module>file</module>
|
<module>file</module>
|
||||||
<module>mongo-update</module>
|
<module>mongo-update</module>
|
||||||
<module>http-client</module>
|
<module>http-client</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
</project>
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<skip>true</skip>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
||||||
+66
-66
@@ -1,66 +1,66 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-core-jaxrs</artifactId>
|
<artifactId>keycloak-core-jaxrs</artifactId>
|
||||||
<name>Keycloak Core JAX-RS</name>
|
<name>Keycloak Core JAX-RS</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
<artifactId>resteasy-jaxrs</artifactId>
|
<artifactId>resteasy-jaxrs</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
<artifactId>jackson-core-asl</artifactId>
|
<artifactId>jackson-core-asl</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
<artifactId>jackson-mapper-asl</artifactId>
|
<artifactId>jackson-mapper-asl</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
<artifactId>resteasy-jackson-provider</artifactId>
|
<artifactId>resteasy-jackson-provider</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.spec.javax.servlet</groupId>
|
<groupId>org.jboss.spec.javax.servlet</groupId>
|
||||||
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
|
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${maven.compiler.source}</source>
|
<source>${maven.compiler.source}</source>
|
||||||
<target>${maven.compiler.target}</target>
|
<target>${maven.compiler.target}</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
+112
-112
@@ -1,112 +1,112 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
<name>Keycloak Core</name>
|
<name>Keycloak Core</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<timestamp>${maven.build.timestamp}</timestamp>
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
|
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
|
||||||
<keycloak.osgi.export>
|
<keycloak.osgi.export>
|
||||||
org.keycloak.*
|
org.keycloak.*
|
||||||
</keycloak.osgi.export>
|
</keycloak.osgi.export>
|
||||||
<keycloak.osgi.import>
|
<keycloak.osgi.import>
|
||||||
net.iharder;version=${base64.version},
|
net.iharder;version=${base64.version},
|
||||||
*;resolution:=optional
|
*;resolution:=optional
|
||||||
</keycloak.osgi.import>
|
</keycloak.osgi.import>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcpkix-jdk15on</artifactId>
|
<artifactId>bcpkix-jdk15on</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.iharder</groupId>
|
<groupId>net.iharder</groupId>
|
||||||
<artifactId>base64</artifactId>
|
<artifactId>base64</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
<artifactId>jackson-core-asl</artifactId>
|
<artifactId>jackson-core-asl</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
<artifactId>jackson-mapper-asl</artifactId>
|
<artifactId>jackson-mapper-asl</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${maven.compiler.source}</source>
|
<source>${maven.compiler.source}</source>
|
||||||
<target>${maven.compiler.target}</target>
|
<target>${maven.compiler.target}</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
|
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.felix</groupId>
|
<groupId>org.apache.felix</groupId>
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>bundle-manifest</id>
|
<id>bundle-manifest</id>
|
||||||
<phase>process-classes</phase>
|
<phase>process-classes</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>manifest</goal>
|
<goal>manifest</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<instructions>
|
<instructions>
|
||||||
<Bundle-ClassPath>.</Bundle-ClassPath>
|
<Bundle-ClassPath>.</Bundle-ClassPath>
|
||||||
<Bundle-Name>${project.name}</Bundle-Name>
|
<Bundle-Name>${project.name}</Bundle-Name>
|
||||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
||||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
||||||
</instructions>
|
</instructions>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -14,8 +14,6 @@ public enum SslRequired {
|
|||||||
EXTERNAL,
|
EXTERNAL,
|
||||||
NONE;
|
NONE;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public boolean isRequired(ClientConnection connection) {
|
public boolean isRequired(ClientConnection connection) {
|
||||||
return isRequired(connection.getRemoteAddr());
|
return isRequired(connection.getRemoteAddr());
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-51
@@ -29,26 +29,7 @@ public class IdentityProviderRepresentation {
|
|||||||
protected String internalId;
|
protected String internalId;
|
||||||
protected String providerId;
|
protected String providerId;
|
||||||
protected boolean enabled = true;
|
protected boolean enabled = true;
|
||||||
|
protected boolean updateProfileFirstLogin = true;
|
||||||
public static final String UPFLM_ON = "on";
|
|
||||||
public static final String UPFLM_MISSING = "missing";
|
|
||||||
public static final String UPFLM_OFF = "off";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mode of profile update after first login when user is created over this identity provider. Possible values:
|
|
||||||
* <ul>
|
|
||||||
* <li><code>on</code> - update profile page is presented for all users
|
|
||||||
* <li><code>missing</code> - update profile page is presented for users with missing some of mandatory user profile fields
|
|
||||||
* <li><code>off</code> - update profile page is newer shown after first login
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* @see #UPFLM_ON
|
|
||||||
* @see #UPFLM_MISSING
|
|
||||||
* @see #UPFLM_OFF
|
|
||||||
*/
|
|
||||||
protected String updateProfileFirstLoginMode = UPFLM_ON;
|
|
||||||
|
|
||||||
protected boolean trustEmail;
|
|
||||||
protected boolean storeToken;
|
protected boolean storeToken;
|
||||||
protected boolean addReadTokenRoleOnCreate;
|
protected boolean addReadTokenRoleOnCreate;
|
||||||
protected boolean authenticateByDefault;
|
protected boolean authenticateByDefault;
|
||||||
@@ -94,29 +75,12 @@ public class IdentityProviderRepresentation {
|
|||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public boolean isUpdateProfileFirstLogin() {
|
||||||
*
|
return this.updateProfileFirstLogin;
|
||||||
* Deprecated because replaced by {@link #updateProfileFirstLoginMode}. Kept here to allow import of old realms.
|
}
|
||||||
*
|
|
||||||
* @deprecated {@link #setUpdateProfileFirstLoginMode(String)}
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void setUpdateProfileFirstLogin(boolean updateProfileFirstLogin) {
|
public void setUpdateProfileFirstLogin(boolean updateProfileFirstLogin) {
|
||||||
this.updateProfileFirstLoginMode = updateProfileFirstLogin ? UPFLM_ON : UPFLM_OFF;
|
this.updateProfileFirstLogin = updateProfileFirstLogin;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return see {@link #updateProfileFirstLoginMode}
|
|
||||||
*/
|
|
||||||
public String getUpdateProfileFirstLoginMode() {
|
|
||||||
return updateProfileFirstLoginMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param updateProfileFirstLoginMode see {@link #updateProfileFirstLoginMode}
|
|
||||||
*/
|
|
||||||
public void setUpdateProfileFirstLoginMode(String updateProfileFirstLoginMode) {
|
|
||||||
this.updateProfileFirstLoginMode = updateProfileFirstLoginMode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAuthenticateByDefault() {
|
public boolean isAuthenticateByDefault() {
|
||||||
@@ -142,13 +106,4 @@ public class IdentityProviderRepresentation {
|
|||||||
public void setAddReadTokenRoleOnCreate(boolean addReadTokenRoleOnCreate) {
|
public void setAddReadTokenRoleOnCreate(boolean addReadTokenRoleOnCreate) {
|
||||||
this.addReadTokenRoleOnCreate = addReadTokenRoleOnCreate;
|
this.addReadTokenRoleOnCreate = addReadTokenRoleOnCreate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isTrustEmail() {
|
|
||||||
return trustEmail;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTrustEmail(boolean trustEmail) {
|
|
||||||
this.trustEmail = trustEmail;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
-20
@@ -11,9 +11,6 @@ public class RealmEventsConfigRepresentation {
|
|||||||
protected Long eventsExpiration;
|
protected Long eventsExpiration;
|
||||||
protected List<String> eventsListeners;
|
protected List<String> eventsListeners;
|
||||||
protected List<String> enabledEventTypes;
|
protected List<String> enabledEventTypes;
|
||||||
|
|
||||||
protected Boolean adminEventsEnabled;
|
|
||||||
protected Boolean adminEventsDetailsEnabled;
|
|
||||||
|
|
||||||
public boolean isEventsEnabled() {
|
public boolean isEventsEnabled() {
|
||||||
return eventsEnabled;
|
return eventsEnabled;
|
||||||
@@ -46,21 +43,4 @@ public class RealmEventsConfigRepresentation {
|
|||||||
public void setEnabledEventTypes(List<String> enabledEventTypes) {
|
public void setEnabledEventTypes(List<String> enabledEventTypes) {
|
||||||
this.enabledEventTypes = enabledEventTypes;
|
this.enabledEventTypes = enabledEventTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isAdminEventsEnabled() {
|
|
||||||
return adminEventsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAdminEventsEnabled(Boolean adminEventsEnabled) {
|
|
||||||
this.adminEventsEnabled = adminEventsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean isAdminEventsDetailsEnabled() {
|
|
||||||
return adminEventsDetailsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAdminEventsDetailsEnabled(Boolean adminEventsDetailsEnabled) {
|
|
||||||
this.adminEventsDetailsEnabled = adminEventsDetailsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -18,14 +18,12 @@ public class RealmRepresentation {
|
|||||||
protected Integer accessCodeLifespanLogin;
|
protected Integer accessCodeLifespanLogin;
|
||||||
protected Boolean enabled;
|
protected Boolean enabled;
|
||||||
protected String sslRequired;
|
protected String sslRequired;
|
||||||
@Deprecated
|
|
||||||
protected Boolean passwordCredentialGrantAllowed;
|
protected Boolean passwordCredentialGrantAllowed;
|
||||||
protected Boolean registrationAllowed;
|
protected Boolean registrationAllowed;
|
||||||
protected Boolean registrationEmailAsUsername;
|
protected Boolean registrationEmailAsUsername;
|
||||||
protected Boolean rememberMe;
|
protected Boolean rememberMe;
|
||||||
protected Boolean verifyEmail;
|
protected Boolean verifyEmail;
|
||||||
protected Boolean resetPasswordAllowed;
|
protected Boolean resetPasswordAllowed;
|
||||||
protected Boolean editUsernameAllowed;
|
|
||||||
|
|
||||||
protected Boolean userCacheEnabled;
|
protected Boolean userCacheEnabled;
|
||||||
protected Boolean realmCacheEnabled;
|
protected Boolean realmCacheEnabled;
|
||||||
@@ -55,20 +53,14 @@ public class RealmRepresentation {
|
|||||||
protected Map<String, String> browserSecurityHeaders;
|
protected Map<String, String> browserSecurityHeaders;
|
||||||
protected Map<String, String> smtpServer;
|
protected Map<String, String> smtpServer;
|
||||||
protected List<UserFederationProviderRepresentation> userFederationProviders;
|
protected List<UserFederationProviderRepresentation> userFederationProviders;
|
||||||
protected List<UserFederationMapperRepresentation> userFederationMappers;
|
|
||||||
protected String loginTheme;
|
protected String loginTheme;
|
||||||
protected String accountTheme;
|
protected String accountTheme;
|
||||||
protected String adminTheme;
|
protected String adminTheme;
|
||||||
protected String emailTheme;
|
protected String emailTheme;
|
||||||
|
|
||||||
protected Boolean eventsEnabled;
|
protected Boolean eventsEnabled;
|
||||||
protected Long eventsExpiration;
|
protected Long eventsExpiration;
|
||||||
protected List<String> eventsListeners;
|
protected List<String> eventsListeners;
|
||||||
protected List<String> enabledEventTypes;
|
protected List<String> enabledEventTypes;
|
||||||
|
|
||||||
protected Boolean adminEventsEnabled;
|
|
||||||
protected Boolean adminEventsDetailsEnabled;
|
|
||||||
|
|
||||||
private List<IdentityProviderRepresentation> identityProviders;
|
private List<IdentityProviderRepresentation> identityProviders;
|
||||||
private List<IdentityProviderMapperRepresentation> identityProviderMappers;
|
private List<IdentityProviderMapperRepresentation> identityProviderMappers;
|
||||||
private List<ProtocolMapperRepresentation> protocolMappers;
|
private List<ProtocolMapperRepresentation> protocolMappers;
|
||||||
@@ -270,6 +262,10 @@ public class RealmRepresentation {
|
|||||||
return passwordCredentialGrantAllowed;
|
return passwordCredentialGrantAllowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPasswordCredentialGrantAllowed(Boolean passwordCredentialGrantAllowed) {
|
||||||
|
this.passwordCredentialGrantAllowed = passwordCredentialGrantAllowed;
|
||||||
|
}
|
||||||
|
|
||||||
public Boolean isRegistrationAllowed() {
|
public Boolean isRegistrationAllowed() {
|
||||||
return registrationAllowed;
|
return registrationAllowed;
|
||||||
}
|
}
|
||||||
@@ -326,14 +322,6 @@ public class RealmRepresentation {
|
|||||||
this.resetPasswordAllowed = resetPassword;
|
this.resetPasswordAllowed = resetPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isEditUsernameAllowed() {
|
|
||||||
return editUsernameAllowed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEditUsernameAllowed(Boolean editUsernameAllowed) {
|
|
||||||
this.editUsernameAllowed = editUsernameAllowed;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Boolean isSocial() {
|
public Boolean isSocial() {
|
||||||
return social;
|
return social;
|
||||||
@@ -519,22 +507,6 @@ public class RealmRepresentation {
|
|||||||
this.enabledEventTypes = enabledEventTypes;
|
this.enabledEventTypes = enabledEventTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isAdminEventsEnabled() {
|
|
||||||
return adminEventsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAdminEventsEnabled(Boolean adminEventsEnabled) {
|
|
||||||
this.adminEventsEnabled = adminEventsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean isAdminEventsDetailsEnabled() {
|
|
||||||
return adminEventsDetailsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAdminEventsDetailsEnabled(Boolean adminEventsDetailsEnabled) {
|
|
||||||
this.adminEventsDetailsEnabled = adminEventsDetailsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<UserFederationProviderRepresentation> getUserFederationProviders() {
|
public List<UserFederationProviderRepresentation> getUserFederationProviders() {
|
||||||
return userFederationProviders;
|
return userFederationProviders;
|
||||||
}
|
}
|
||||||
@@ -543,19 +515,6 @@ public class RealmRepresentation {
|
|||||||
this.userFederationProviders = userFederationProviders;
|
this.userFederationProviders = userFederationProviders;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<UserFederationMapperRepresentation> getUserFederationMappers() {
|
|
||||||
return userFederationMappers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserFederationMappers(List<UserFederationMapperRepresentation> userFederationMappers) {
|
|
||||||
this.userFederationMappers = userFederationMappers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addUserFederationMapper(UserFederationMapperRepresentation userFederationMapper) {
|
|
||||||
if (userFederationMappers == null) userFederationMappers = new LinkedList<>();
|
|
||||||
userFederationMappers.add(userFederationMapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<IdentityProviderRepresentation> getIdentityProviders() {
|
public List<IdentityProviderRepresentation> getIdentityProviders() {
|
||||||
return identityProviders;
|
return identityProviders;
|
||||||
}
|
}
|
||||||
|
|||||||
-56
@@ -1,56 +0,0 @@
|
|||||||
package org.keycloak.representations.idm;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
|
|
||||||
*/
|
|
||||||
public class UserFederationMapperRepresentation {
|
|
||||||
|
|
||||||
protected String id;
|
|
||||||
protected String name;
|
|
||||||
protected String federationProviderDisplayName;
|
|
||||||
protected String federationMapperType;
|
|
||||||
protected Map<String, String> config;
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFederationProviderDisplayName() {
|
|
||||||
return federationProviderDisplayName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFederationProviderDisplayName(String federationProviderDisplayName) {
|
|
||||||
this.federationProviderDisplayName = federationProviderDisplayName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFederationMapperType() {
|
|
||||||
return federationMapperType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFederationMapperType(String federationMapperType) {
|
|
||||||
this.federationMapperType = federationMapperType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, String> getConfig() {
|
|
||||||
return config;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfig(Map<String, String> config) {
|
|
||||||
this.config = config;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-56
@@ -1,56 +0,0 @@
|
|||||||
package org.keycloak.representations.idm;
|
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
|
|
||||||
*/
|
|
||||||
public class UserFederationMapperTypeRepresentation {
|
|
||||||
protected String id;
|
|
||||||
protected String name;
|
|
||||||
protected String category;
|
|
||||||
protected String helpText;
|
|
||||||
|
|
||||||
protected List<ConfigPropertyRepresentation> properties = new LinkedList<>();
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCategory() {
|
|
||||||
return category;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCategory(String category) {
|
|
||||||
this.category = category;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getHelpText() {
|
|
||||||
return helpText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHelpText(String helpText) {
|
|
||||||
this.helpText = helpText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ConfigPropertyRepresentation> getProperties() {
|
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProperties(List<ConfigPropertyRepresentation> properties) {
|
|
||||||
this.properties = properties;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Executable → Regular
+1
-11
@@ -34,17 +34,7 @@ public class HtmlUtils {
|
|||||||
for (int i = 0; i < value.length(); i++) {
|
for (int i = 0; i < value.length(); i++) {
|
||||||
char chr = value.charAt(i);
|
char chr = value.charAt(i);
|
||||||
|
|
||||||
if (chr == '<') {
|
if (chr != '\'' && chr != '"' && chr != '<' && chr != '>' && chr != '/') {
|
||||||
escaped.append("<");
|
|
||||||
} else if (chr == '>') {
|
|
||||||
escaped.append(">");
|
|
||||||
} else if (chr == '"') {
|
|
||||||
escaped.append(""");
|
|
||||||
} else if (chr == '\'') {
|
|
||||||
escaped.append("'");
|
|
||||||
} else if (chr == '&') {
|
|
||||||
escaped.append("&");
|
|
||||||
} else {
|
|
||||||
escaped.append(chr);
|
escaped.append(chr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.codehaus.jackson.annotate.JsonAnyGetter;
|
import org.codehaus.jackson.annotate.JsonAnyGetter;
|
||||||
@@ -91,21 +90,4 @@ public class JsonParserTest {
|
|||||||
Assert.assertEquals(100, config.getCorsMaxAge());
|
Assert.assertEquals(100, config.getCorsMaxAge());
|
||||||
Assert.assertEquals(200, config.getConnectionPoolSize());
|
Assert.assertEquals(200, config.getConnectionPoolSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
static Pattern substitution = Pattern.compile("\\$\\{([^}]+)\\}");
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testSub() {
|
|
||||||
String pattern = "${ALIAS}.${CRAP}";
|
|
||||||
Matcher m = substitution.matcher(pattern);
|
|
||||||
StringBuffer sb = new StringBuffer();
|
|
||||||
while (m.find()) {
|
|
||||||
System.out.println("GROUP: " + m.group(1));
|
|
||||||
m.appendReplacement(sb, m.group(1));
|
|
||||||
|
|
||||||
}
|
|
||||||
m.appendTail(sb);
|
|
||||||
System.out.println(sb.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Vendored
+1
-13
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
@@ -17,16 +17,4 @@
|
|||||||
<module>server-min</module>
|
<module>server-min</module>
|
||||||
<module>server-all</module>
|
<module>server-all</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<skip>true</skip>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
</project>
|
||||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
+30
-30
@@ -1,30 +1,30 @@
|
|||||||
<assembly>
|
<assembly>
|
||||||
<id>war-dist</id>
|
<id>war-dist</id>
|
||||||
|
|
||||||
<formats>
|
<formats>
|
||||||
<format>zip</format>
|
<format>zip</format>
|
||||||
<format>tar.gz</format>
|
<format>tar.gz</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.build.directory}/unpacked</directory>
|
<directory>${project.build.directory}/unpacked</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>org/bouncycastle/**</include>
|
<include>org/bouncycastle/**</include>
|
||||||
<include>net/iharder/base64/**</include>
|
<include>net/iharder/base64/**</include>
|
||||||
<include>org/keycloak/keycloak-core/**</include>
|
<include>org/apache/httpcomponents/**</include>
|
||||||
<include>org/keycloak/keycloak-adapter-core/**</include>
|
<include>org/keycloak/keycloak-core/**</include>
|
||||||
<include>org/keycloak/keycloak-jboss-adapter-core/**</include>
|
<include>org/keycloak/keycloak-adapter-core/**</include>
|
||||||
<include>org/keycloak/keycloak-as7-adapter/**</include>
|
<include>org/keycloak/keycloak-jboss-adapter-core/**</include>
|
||||||
<include>org/keycloak/keycloak-as7-subsystem/**</include>
|
<include>org/keycloak/keycloak-undertow-adapter/**</include>
|
||||||
<include>org/keycloak/keycloak-adapter-subsystem/**</include>
|
<include>org/keycloak/keycloak-as7-adapter/**</include>
|
||||||
<include>org/keycloak/keycloak-servlet-oauth-client/**</include>
|
<include>org/keycloak/keycloak-as7-subsystem/**</include>
|
||||||
</includes>
|
</includes>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>**/*.war</exclude>
|
<exclude>**/*.war</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<outputDirectory>modules</outputDirectory>
|
<outputDirectory>modules</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
+79
-79
@@ -1,79 +1,79 @@
|
|||||||
<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">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>keycloak-as7-adapter-dist</artifactId>
|
<artifactId>keycloak-as7-adapter-dist</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Keycloak AS7 Adapter Distro</name>
|
<name>Keycloak AS7 Adapter Distro</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-as7-adapter</artifactId>
|
<artifactId>keycloak-as7-adapter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-as7-modules</artifactId>
|
<artifactId>keycloak-jboss-modules</artifactId>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>unpack</id>
|
<id>unpack</id>
|
||||||
<phase>prepare-package</phase>
|
<phase>prepare-package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>unpack</goal>
|
<goal>unpack</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<artifactItems>
|
<artifactItems>
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-as7-modules</artifactId>
|
<artifactId>keycloak-jboss-modules</artifactId>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
</artifactItems>
|
</artifactItems>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>assemble</id>
|
<id>assemble</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>single</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<descriptors>
|
<descriptors>
|
||||||
<descriptor>assembly.xml</descriptor>
|
<descriptor>assembly.xml</descriptor>
|
||||||
</descriptors>
|
</descriptors>
|
||||||
<outputDirectory>
|
<outputDirectory>
|
||||||
target
|
target
|
||||||
</outputDirectory>
|
</outputDirectory>
|
||||||
<workDirectory>
|
<workDirectory>
|
||||||
target/assembly/work
|
target/assembly/work
|
||||||
</workDirectory>
|
</workDirectory>
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<assembly>
|
|
||||||
<id>dist</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory>../../</directory>
|
|
||||||
<includes>
|
|
||||||
<include>License.html</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/modules</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
</assembly>
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
<!--
|
|
||||||
~ JBoss, Home of Professional Open Source.
|
|
||||||
~ Copyright 2012, Red Hat, Inc., and individual contributors
|
|
||||||
~ as indicated by the @author tags. See the copyright.txt file in the
|
|
||||||
~ distribution for a full listing of individual contributors.
|
|
||||||
~
|
|
||||||
~ This is free software; you can redistribute it and/or modify it
|
|
||||||
~ under the terms of the GNU Lesser General Public License as
|
|
||||||
~ published by the Free Software Foundation; either version 2.1 of
|
|
||||||
~ the License, or (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This software is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
~ Lesser General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU Lesser General Public
|
|
||||||
~ License along with this software; if not, write to the Free
|
|
||||||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="module-repository" basedir="." default="all">
|
|
||||||
|
|
||||||
<import file="lib.xml"/>
|
|
||||||
|
|
||||||
<property name="output.dir" value="target"/>
|
|
||||||
|
|
||||||
<target name="all">
|
|
||||||
<antcall target="modules">
|
|
||||||
<param name="mavenized.modules" value="false"/>
|
|
||||||
<param name="output.dir" value="target"/>
|
|
||||||
</antcall>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
<target name="modules">
|
|
||||||
|
|
||||||
<!-- server min dependencies -->
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-core">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-core"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="net.iharder.base64">
|
|
||||||
<maven-resource group="net.iharder" artifact="base64"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.bouncycastle">
|
|
||||||
<maven-resource group="org.bouncycastle" artifact="bcprov-jdk15on"/>
|
|
||||||
<maven-resource group="org.bouncycastle" artifact="bcpkix-jdk15on"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<!-- subsystems -->
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-adapter-core">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-adapter-core"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-jboss-adapter-core">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-jboss-adapter-core"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-as7-adapter">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-as7-adapter"/>
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-tomcat-core-adapter"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-as7-subsystem">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-as7-subsystem"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-servlet-oauth-client">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-servlet-oauth-client"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean-target">
|
|
||||||
<delete dir="${output.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean" depends="clean-target">
|
|
||||||
<delete file="maven-ant-tasks.jar"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@@ -1,167 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<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/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>1.3.1.Final</version>
|
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>keycloak-as7-modules</artifactId>
|
|
||||||
|
|
||||||
<name>Keycloak AS7 / JBoss EAP 6 Modules</name>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-adapter-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jboss-adapter-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-as7-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-tomcat-core-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-as7-subsystem</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-servlet-oauth-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>net.iharder</groupId>
|
|
||||||
<artifactId>base64</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcpkix-jdk15on</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<inherited>false</inherited>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>build-dist</id>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>compile</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<ant antfile="build.xml" inheritRefs="true">
|
|
||||||
<target name="all"/>
|
|
||||||
</ant>
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss</groupId>
|
|
||||||
<artifactId>jandex</artifactId>
|
|
||||||
<version>1.0.3.Final</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ant-contrib</groupId>
|
|
||||||
<artifactId>ant-contrib</artifactId>
|
|
||||||
<version>1.0b3</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>ant</groupId>
|
|
||||||
<artifactId>ant</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.ant</groupId>
|
|
||||||
<artifactId>ant-apache-bsf</artifactId>
|
|
||||||
<version>1.9.3</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.bsf</groupId>
|
|
||||||
<artifactId>bsf-api</artifactId>
|
|
||||||
<version>3.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>rhino</groupId>
|
|
||||||
<artifactId>js</artifactId>
|
|
||||||
<version>1.7R2</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>assemble</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>assembly.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
<outputDirectory>
|
|
||||||
target
|
|
||||||
</outputDirectory>
|
|
||||||
<workDirectory>
|
|
||||||
target/assembly/work
|
|
||||||
</workDirectory>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>copy-resources</id>
|
|
||||||
<!-- here the phase you need -->
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-resources</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/modules/org/keycloak/keycloak-adapter-subsystem</outputDirectory>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources/modules/org/keycloak/keycloak-adapter-subsystem</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-adapter-core">
|
|
||||||
<resources>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
<dependencies>
|
|
||||||
<module name="javax.api"/>
|
|
||||||
<module name="org.codehaus.jackson.jackson-core-asl"/>
|
|
||||||
<module name="org.codehaus.jackson.jackson-mapper-asl"/>
|
|
||||||
<module name="org.codehaus.jackson.jackson-xc"/>
|
|
||||||
<module name="org.apache.httpcomponents"/>
|
|
||||||
<module name="org.jboss.logging"/>
|
|
||||||
<module name="org.keycloak.keycloak-core"/>
|
|
||||||
<module name="net.iharder.base64"/>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</module>
|
|
||||||
-38
@@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
~ JBoss, Home of Professional Open Source.
|
|
||||||
~ Copyright 2014, Red Hat, Inc., and individual contributors
|
|
||||||
~ as indicated by the @author tags. See the copyright.txt file in the
|
|
||||||
~ distribution for a full listing of individual contributors.
|
|
||||||
~
|
|
||||||
~ This is free software; you can redistribute it and/or modify it
|
|
||||||
~ under the terms of the GNU Lesser General Public License as
|
|
||||||
~ published by the Free Software Foundation; either version 2.1 of
|
|
||||||
~ the License, or (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This software is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
~ Lesser General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU Lesser General Public
|
|
||||||
~ License along with this software; if not, write to the Free
|
|
||||||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-adapter-subsystem">
|
|
||||||
<properties>
|
|
||||||
<property name="keycloak-version" value="${project.version}"/>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<resource-root path="."/>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<module name="org.keycloak.keycloak-as7-subsystem" export="true" services="export"/>
|
|
||||||
</dependencies>
|
|
||||||
</module>
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-servlet-oauth-client">
|
|
||||||
<resources>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
<dependencies>
|
|
||||||
<module name="javax.api"/>
|
|
||||||
<module name="javax.servlet.api"/>
|
|
||||||
<module name="org.jboss.logging"/>
|
|
||||||
<module name="org.picketbox"/>
|
|
||||||
<module name="org.apache.httpcomponents"/>
|
|
||||||
<module name="org.keycloak.keycloak-adapter-core"/>
|
|
||||||
<module name="org.keycloak.keycloak-core"/>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</module>
|
|
||||||
@@ -1,21 +0,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-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>1.3.1.Final</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<name>Keycloak AS7 / JBoss EAP 6 Adapter Distros</name>
|
|
||||||
<description/>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>keycloak-as7-eap6-adapter-dist-pom</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>as7-modules</module>
|
|
||||||
<module>as7-adapter-zip</module>
|
|
||||||
<module>eap6-adapter-zip</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
||||||
+30
-30
@@ -1,30 +1,30 @@
|
|||||||
<assembly>
|
<assembly>
|
||||||
<id>war-dist</id>
|
<id>war-dist</id>
|
||||||
|
|
||||||
<formats>
|
<formats>
|
||||||
<format>zip</format>
|
<format>zip</format>
|
||||||
<format>tar.gz</format>
|
<format>tar.gz</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.build.directory}/unpacked</directory>
|
<directory>${project.build.directory}/unpacked</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>org/bouncycastle/**</include>
|
<include>net/iharder/base64/**</include>
|
||||||
<include>net/iharder/base64/**</include>
|
<include>org/bouncycastle/**</include>
|
||||||
<include>org/keycloak/keycloak-core/**</include>
|
<include>org/apache/httpcomponents/**</include>
|
||||||
<include>org/keycloak/keycloak-adapter-core/**</include>
|
<include>org/keycloak/keycloak-core/**</include>
|
||||||
<include>org/keycloak/keycloak-jboss-adapter-core/**</include>
|
<include>org/keycloak/keycloak-adapter-core/**</include>
|
||||||
<include>org/keycloak/keycloak-as7-adapter/**</include>
|
<include>org/keycloak/keycloak-jboss-adapter-core/**</include>
|
||||||
<include>org/keycloak/keycloak-as7-subsystem/**</include>
|
<include>org/keycloak/keycloak-undertow-adapter/**</include>
|
||||||
<include>org/keycloak/keycloak-adapter-subsystem/**</include>
|
<include>org/keycloak/keycloak-as7-adapter/**</include>
|
||||||
<include>org/keycloak/keycloak-servlet-oauth-client/**</include>
|
<include>org/keycloak/keycloak-subsystem/**</include>
|
||||||
</includes>
|
</includes>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>**/*.war</exclude>
|
<exclude>**/*.war</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<outputDirectory>modules/system/layers/base</outputDirectory>
|
<outputDirectory>modules/system/layers/base</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
+5
-5
@@ -4,13 +4,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Keycloak JBoss EAP 6 Adapter Distro</name>
|
<name>Keycloak EAP6 Adapter Distro</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-as7-modules</artifactId>
|
<artifactId>keycloak-jboss-modules</artifactId>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<artifactItems>
|
<artifactItems>
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-as7-modules</artifactId>
|
<artifactId>keycloak-jboss-modules</artifactId>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
@@ -1,51 +1,51 @@
|
|||||||
<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">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>keycloak-jetty81-adapter-dist</artifactId>
|
<artifactId>keycloak-jetty81-adapter-dist</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Keycloak Jetty 8.1.x Adapter Distro</name>
|
<name>Keycloak Jetty 8.1.x Adapter Distro</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-jetty81-adapter</artifactId>
|
<artifactId>keycloak-jetty81-adapter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>assemble</id>
|
<id>assemble</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>single</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<descriptors>
|
<descriptors>
|
||||||
<descriptor>assembly.xml</descriptor>
|
<descriptor>assembly.xml</descriptor>
|
||||||
</descriptors>
|
</descriptors>
|
||||||
<outputDirectory>
|
<outputDirectory>
|
||||||
target
|
target
|
||||||
</outputDirectory>
|
</outputDirectory>
|
||||||
<workDirectory>
|
<workDirectory>
|
||||||
target/assembly/work
|
target/assembly/work
|
||||||
</workDirectory>
|
</workDirectory>
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -1,71 +1,71 @@
|
|||||||
<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">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>keycloak-js-adapter-dist</artifactId>
|
<artifactId>keycloak-js-adapter-dist</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Keycloak JS Adapter Distribution</name>
|
<name>Keycloak JS Adapter Distribution</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>unpack</id>
|
<id>unpack</id>
|
||||||
<phase>prepare-package</phase>
|
<phase>prepare-package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>unpack</goal>
|
<goal>unpack</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<artifactItems>
|
<artifactItems>
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-js-adapter</artifactId>
|
<artifactId>keycloak-js-adapter</artifactId>
|
||||||
<outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory>
|
<outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory>
|
||||||
<includes>*.js</includes>
|
<includes>*.js</includes>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
</artifactItems>
|
</artifactItems>
|
||||||
<excludes>**/welcome-content/*</excludes>
|
<excludes>**/welcome-content/*</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>assemble</id>
|
<id>assemble</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>single</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<descriptors>
|
<descriptors>
|
||||||
<descriptor>assembly.xml</descriptor>
|
<descriptor>assembly.xml</descriptor>
|
||||||
</descriptors>
|
</descriptors>
|
||||||
<outputDirectory>
|
<outputDirectory>
|
||||||
target
|
target
|
||||||
</outputDirectory>
|
</outputDirectory>
|
||||||
<workDirectory>
|
<workDirectory>
|
||||||
target/assembly/work
|
target/assembly/work
|
||||||
</workDirectory>
|
</workDirectory>
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
<relativePath>../../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<name>Keycloak OSGI Features</name>
|
<name>Keycloak OSGI Features</name>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
<relativePath>../../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<name>Keycloak OSGI JAAS Realm Configuration</name>
|
<name>Keycloak OSGI JAAS Realm Configuration</name>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<name>Keycloak OSGI Integration</name>
|
<name>Keycloak OSGI Integration</name>
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
<relativePath>../../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -1,42 +1,30 @@
|
|||||||
<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-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Adapters Distribution Parent</name>
|
<name>Adapters Distribution Parent</name>
|
||||||
<description/>
|
<description/>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>keycloak-adapters-distribution-parent</artifactId>
|
<artifactId>keycloak-adapters-distribution-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<build>
|
<modules>
|
||||||
<plugins>
|
<!--<module>as7-adapter-zip</module>-->
|
||||||
<plugin>
|
<module>eap6-adapter-zip</module>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<module>jetty81-adapter-zip</module>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<!--<module>jetty91-adapter-zip</module>-->
|
||||||
<configuration>
|
<!--<module>jetty92-adapter-zip</module>-->
|
||||||
<skip>true</skip>
|
<module>js-adapter-zip</module>
|
||||||
</configuration>
|
<module>osgi</module>
|
||||||
</plugin>
|
<!--<module>tomcat6-adapter-zip</module>-->
|
||||||
</plugins>
|
<!--<module>tomcat7-adapter-zip</module>-->
|
||||||
</build>
|
<!--<module>tomcat8-adapter-zip</module>-->
|
||||||
|
<!--<module>wildfly-adapter-zip</module>-->
|
||||||
<modules>
|
</modules>
|
||||||
<module>as7-eap6-adapter</module>
|
</project>
|
||||||
<module>jetty81-adapter-zip</module>
|
|
||||||
<module>jetty91-adapter-zip</module>
|
|
||||||
<module>jetty92-adapter-zip</module>
|
|
||||||
<module>js-adapter-zip</module>
|
|
||||||
<module>osgi</module>
|
|
||||||
<module>tomcat6-adapter-zip</module>
|
|
||||||
<module>tomcat7-adapter-zip</module>
|
|
||||||
<module>tomcat8-adapter-zip</module>
|
|
||||||
<module>wf8-adapter</module>
|
|
||||||
<module>wf9-adapter</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.3.1.Final</version>
|
<version>1.2.0.Final-redhat-2</version>
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,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-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>1.3.1.Final</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<name>Keycloak Wildfly 8 Adapter</name>
|
|
||||||
<description/>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>keycloak-wf8-adapter-dist-pom</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>wf8-modules</module>
|
|
||||||
<module>wf8-adapter-zip</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<assembly>
|
|
||||||
<id>dist</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory>../../</directory>
|
|
||||||
<includes>
|
|
||||||
<include>License.html</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/modules</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
</assembly>
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
<!--
|
|
||||||
~ JBoss, Home of Professional Open Source.
|
|
||||||
~ Copyright 2012, Red Hat, Inc., and individual contributors
|
|
||||||
~ as indicated by the @author tags. See the copyright.txt file in the
|
|
||||||
~ distribution for a full listing of individual contributors.
|
|
||||||
~
|
|
||||||
~ This is free software; you can redistribute it and/or modify it
|
|
||||||
~ under the terms of the GNU Lesser General Public License as
|
|
||||||
~ published by the Free Software Foundation; either version 2.1 of
|
|
||||||
~ the License, or (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This software is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
~ Lesser General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU Lesser General Public
|
|
||||||
~ License along with this software; if not, write to the Free
|
|
||||||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="module-repository" basedir="." default="all">
|
|
||||||
|
|
||||||
<import file="lib.xml"/>
|
|
||||||
|
|
||||||
<property name="output.dir" value="target"/>
|
|
||||||
|
|
||||||
<target name="all">
|
|
||||||
<antcall target="modules">
|
|
||||||
<param name="mavenized.modules" value="false"/>
|
|
||||||
<param name="output.dir" value="target"/>
|
|
||||||
</antcall>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
<target name="modules">
|
|
||||||
|
|
||||||
<!-- server min dependencies -->
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-core">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-core"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="net.iharder.base64">
|
|
||||||
<maven-resource group="net.iharder" artifact="base64"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- subsystems -->
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-adapter-core">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-adapter-core"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-jboss-adapter-core">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-jboss-adapter-core"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-undertow-adapter">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-undertow-adapter"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-wildfly-adapter">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-wildfly-adapter"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-wf8-subsystem">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-wf8-subsystem"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-servlet-oauth-client">
|
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-servlet-oauth-client"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
<module-def name="org.apache.httpcomponents" slot="4.3">
|
|
||||||
<maven-resource group="org.apache.httpcomponents" artifact="httpclient"/>
|
|
||||||
<maven-resource group="org.apache.httpcomponents" artifact="httpcore"/>
|
|
||||||
<maven-resource group="org.apache.httpcomponents" artifact="httpmime"/>
|
|
||||||
</module-def>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean-target">
|
|
||||||
<delete dir="${output.dir}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean" depends="clean-target">
|
|
||||||
<delete file="maven-ant-tasks.jar"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@@ -1,282 +0,0 @@
|
|||||||
<!--
|
|
||||||
~ JBoss, Home of Professional Open Source.
|
|
||||||
~ Copyright 2010, Red Hat, Inc., and individual contributors
|
|
||||||
~ as indicated by the @author tags. See the copyright.txt file in the
|
|
||||||
~ distribution for a full listing of individual contributors.
|
|
||||||
~
|
|
||||||
~ This is free software; you can redistribute it and/or modify it
|
|
||||||
~ under the terms of the GNU Lesser General Public License as
|
|
||||||
~ published by the Free Software Foundation; either version 2.1 of
|
|
||||||
~ the License, or (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This software is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
~ Lesser General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU Lesser General Public
|
|
||||||
~ License along with this software; if not, write to the Free
|
|
||||||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="module-repository-lib">
|
|
||||||
|
|
||||||
<property name="src.dir" value="src"/>
|
|
||||||
<property name="module.repo.src.dir" value="${src.dir}/main/resources/modules"/>
|
|
||||||
<property name="module.xml" value="module.xml"/>
|
|
||||||
|
|
||||||
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
|
|
||||||
<taskdef name="jandex" classname="org.jboss.jandex.JandexAntTask" />
|
|
||||||
|
|
||||||
<macrodef name="module-def">
|
|
||||||
<attribute name="name"/>
|
|
||||||
<attribute name="slot" default="main"/>
|
|
||||||
<element name="resources" implicit="yes" optional="yes"/>
|
|
||||||
|
|
||||||
<sequential>
|
|
||||||
<echo message="Initializing module -> @{name}"/>
|
|
||||||
<property name="module.repo.output.dir" value="${output.dir}/modules"/>
|
|
||||||
<!-- Figure out the correct module path -->
|
|
||||||
<define-module-dir name="@{name}" slot="@{slot}"/>
|
|
||||||
|
|
||||||
<!-- Make the module output director -->
|
|
||||||
<mkdir dir="${module.repo.output.dir}/${current.module.path}"/>
|
|
||||||
|
|
||||||
<!-- Copy the module.xml and other stuff to the output director -->
|
|
||||||
<copy todir="${module.repo.output.dir}/${current.module.path}" overwrite="true">
|
|
||||||
<fileset dir="${module.repo.src.dir}/${current.module.path}">
|
|
||||||
<include name="**"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<!-- Process the resource -->
|
|
||||||
<resources/>
|
|
||||||
|
|
||||||
<!-- Add keycloak version property to module xml -->
|
|
||||||
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}"
|
|
||||||
token="$${project.version}"
|
|
||||||
value="${project.version}"/>
|
|
||||||
|
|
||||||
<!-- Some final cleanup -->
|
|
||||||
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}">
|
|
||||||
<replacetoken>
|
|
||||||
<![CDATA[
|
|
||||||
<!-- Insert resources here -->]]></replacetoken>
|
|
||||||
<replacevalue>
|
|
||||||
</replacevalue>
|
|
||||||
</replace>
|
|
||||||
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
<macrodef name="bundle-def">
|
|
||||||
<attribute name="name"/>
|
|
||||||
<attribute name="slot" default="main"/>
|
|
||||||
<element name="resources" implicit="yes" optional="yes"/>
|
|
||||||
|
|
||||||
<sequential>
|
|
||||||
<echo message="Initializing bundle -> @{name}"/>
|
|
||||||
<property name="bundle.repo.output.dir" value="${output.dir}/bundles/system/layers/base"/>
|
|
||||||
<!-- Figure out the correct bundle path -->
|
|
||||||
<define-bundle-dir name="@{name}" slot="@{slot}" />
|
|
||||||
|
|
||||||
<!-- Make the bundle output director -->
|
|
||||||
<mkdir dir="${bundle.repo.output.dir}/${current.bundle.path}"/>
|
|
||||||
|
|
||||||
<!-- Process the resource -->
|
|
||||||
<resources/>
|
|
||||||
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
<macrodef name="maven-bundle" >
|
|
||||||
<attribute name="group"/>
|
|
||||||
<attribute name="artifact"/>
|
|
||||||
|
|
||||||
<sequential>
|
|
||||||
<!-- Copy the jar to the bundle dir -->
|
|
||||||
<property name="bundle.repo.output.dir" value="${output.dir}/bundles/system/layers/base"/>
|
|
||||||
<copy todir="${bundle.repo.output.dir}/${current.bundle.path}" failonerror="true">
|
|
||||||
<fileset file="${@{group}:@{artifact}:jar}"/>
|
|
||||||
<mapper type="flatten" />
|
|
||||||
</copy>
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
<scriptdef name="define-module-dir" language="javascript" manager="bsf">
|
|
||||||
<attribute name="name"/>
|
|
||||||
<attribute name="slot"/>
|
|
||||||
<![CDATA[
|
|
||||||
name = attributes.get("name");
|
|
||||||
name = name.replace(".", "/");
|
|
||||||
project.setProperty("current.module.path", name + "/" + attributes.get("slot"));
|
|
||||||
]]>
|
|
||||||
</scriptdef>
|
|
||||||
|
|
||||||
<scriptdef name="define-bundle-dir" language="javascript" manager="bsf">
|
|
||||||
<attribute name="name"/>
|
|
||||||
<attribute name="slot"/>
|
|
||||||
<![CDATA[
|
|
||||||
name = attributes.get("name");
|
|
||||||
name = name.replace(".", "/");
|
|
||||||
project.setProperty("current.bundle.path", name + "/" + attributes.get("slot"));
|
|
||||||
]]>
|
|
||||||
</scriptdef>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Get the version from the parent directory of the jar. If the parent directory is 'target' this
|
|
||||||
means that the jar is contained in AS build so extract the version from the file name
|
|
||||||
-->
|
|
||||||
<scriptdef name="define-maven-artifact" language="javascript" manager="bsf">
|
|
||||||
<attribute name="group"/>
|
|
||||||
<attribute name="artifact"/>
|
|
||||||
<attribute name="classifier"/>
|
|
||||||
<attribute name="element"/>
|
|
||||||
<attribute name="path"/>
|
|
||||||
<![CDATA[
|
|
||||||
importClass(Packages.java.io.File);
|
|
||||||
group = attributes.get("group");
|
|
||||||
artifact = attributes.get("artifact");
|
|
||||||
classifier = attributes.get("classifier");
|
|
||||||
element = attributes.get("element");
|
|
||||||
path = attributes.get("path");
|
|
||||||
if(path.indexOf('${') != -1) {
|
|
||||||
throw "Module resource root not found, make sure it is listed in build/pom.xml" + path;
|
|
||||||
}
|
|
||||||
fp = new File(path);
|
|
||||||
version = fp.getParentFile().getName();
|
|
||||||
if (version.equals("target")) {
|
|
||||||
version = fp.getName();
|
|
||||||
version = version.substring(artifact.length() + 1);
|
|
||||||
suffix = ".jar";
|
|
||||||
if (classifier) {
|
|
||||||
suffix = "-" + classifier + suffix;
|
|
||||||
}
|
|
||||||
version = version.replace(suffix, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
root = "<" + element + " name=\"" + group + ":" + artifact + ":" + version;
|
|
||||||
if (classifier) {
|
|
||||||
root = root + ":" + classifier;
|
|
||||||
}
|
|
||||||
root = root + "\"/>";
|
|
||||||
project.setProperty("current.maven.root", root);
|
|
||||||
]]>
|
|
||||||
</scriptdef>
|
|
||||||
|
|
||||||
<macrodef name="maven-resource" >
|
|
||||||
<attribute name="group"/>
|
|
||||||
<attribute name="artifact"/>
|
|
||||||
<attribute name="jandex" default="false" />
|
|
||||||
|
|
||||||
<sequential>
|
|
||||||
<if>
|
|
||||||
<equals arg1="${mavenized.modules}" arg2="true"/>
|
|
||||||
<then>
|
|
||||||
<define-maven-artifact group="@{group}" artifact="@{artifact}" element="artifact" path="${@{group}:@{artifact}:jar}"/>
|
|
||||||
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}">
|
|
||||||
<replacefilter token="<!-- Insert resources here -->" value="${current.maven.root} <!-- Insert resources here -->"/>
|
|
||||||
</replace>
|
|
||||||
</then>
|
|
||||||
|
|
||||||
<else>
|
|
||||||
<!-- Copy the jar to the module dir -->
|
|
||||||
<copy todir="${module.repo.output.dir}/${current.module.path}" failonerror="true">
|
|
||||||
<fileset file="${@{group}:@{artifact}:jar}"/>
|
|
||||||
<mapper type="flatten" />
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<basename file="${@{group}:@{artifact}:jar}" property="resourcename.@{group}.@{artifact}"/>
|
|
||||||
<!-- Generate the Jandex Index -->
|
|
||||||
<jandex run="@{jandex}" newJar="true" >
|
|
||||||
<fileset dir="${module.repo.output.dir}/${current.module.path}" />
|
|
||||||
</jandex>
|
|
||||||
<!-- Update the resource entry in module.xml -->
|
|
||||||
<define-resource-root path="${resourcename.@{group}.@{artifact}}" jandex="@{jandex}"/>
|
|
||||||
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}">
|
|
||||||
<replacefilter token="<!-- Insert resources here -->" value="${current.resource.root} <!-- Insert resources here -->"/>
|
|
||||||
</replace>
|
|
||||||
</else>
|
|
||||||
</if>
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<macrodef name="maven-resource-with-classifier" >
|
|
||||||
<attribute name="group"/>
|
|
||||||
<attribute name="artifact"/>
|
|
||||||
<attribute name="classifier"/>
|
|
||||||
<attribute name="jandex" default="false" />
|
|
||||||
|
|
||||||
<sequential>
|
|
||||||
<if>
|
|
||||||
<equals arg1="${mavenized.modules}" arg2="true"/>
|
|
||||||
<then>
|
|
||||||
<define-maven-artifact group="@{group}" artifact="@{artifact}" element="artifact" classifier="@{classifier}" path="${@{group}:@{artifact}:jar:@{classifier}}"/>
|
|
||||||
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}">
|
|
||||||
<replacefilter token="<!-- Insert resources here -->" value="${current.maven.root} <!-- Insert resources here -->"/>
|
|
||||||
</replace>
|
|
||||||
</then>
|
|
||||||
<else>
|
|
||||||
<!-- Copy the jar to the module dir -->
|
|
||||||
<copy todir="${module.repo.output.dir}/${current.module.path}" failonerror="true">
|
|
||||||
<fileset file="${@{group}:@{artifact}:jar:@{classifier}}"/>
|
|
||||||
<!-- http://jira.codehaus.org/browse/MANTRUN-159 -->
|
|
||||||
<mapper type="flatten" />
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<basename file="${@{group}:@{artifact}:jar:@{classifier}}" property="resourcename.@{group}.@{artifact}.@{classifier}"/>
|
|
||||||
|
|
||||||
<!-- Update the resource entry in module.xml -->
|
|
||||||
<define-resource-root path="${resourcename.@{group}.@{artifact}.@{classifier}}"/>
|
|
||||||
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}">
|
|
||||||
<replacefilter token="<!-- Insert resources here -->" value="${current.resource.root} <!-- Insert resources here -->"/>
|
|
||||||
</replace>
|
|
||||||
</else>
|
|
||||||
</if>
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
<macrodef name="extract-native-jar" >
|
|
||||||
<attribute name="group"/>
|
|
||||||
<attribute name="artifact"/>
|
|
||||||
<sequential>
|
|
||||||
<if>
|
|
||||||
<equals arg1="${mavenized.modules}" arg2="true"/>
|
|
||||||
<then>
|
|
||||||
<define-maven-artifact group="@{group}" artifact="@{artifact}" element="native-artifact" path="${@{group}:@{artifact}:jar}"/>
|
|
||||||
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}">
|
|
||||||
<replacefilter token="<!-- Insert resources here -->" value="${current.maven.root} <!-- Insert resources here -->"/>
|
|
||||||
</replace>
|
|
||||||
</then>
|
|
||||||
|
|
||||||
<else>
|
|
||||||
<unzip src="${@{group}:@{artifact}:jar}" dest="${module.repo.output.dir}/${current.module.path}">
|
|
||||||
<patternset>
|
|
||||||
<include name="lib/**"/>
|
|
||||||
</patternset>
|
|
||||||
</unzip>
|
|
||||||
</else>
|
|
||||||
</if>
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
<scriptdef name="define-resource-root" language="javascript" manager="bsf">
|
|
||||||
<attribute name="path"/>
|
|
||||||
<attribute name="jandex"/>
|
|
||||||
<![CDATA[
|
|
||||||
path = attributes.get("path");
|
|
||||||
root = "<resource-root path=\"" + path + "\"/>";
|
|
||||||
if(path.indexOf('${') != -1) {
|
|
||||||
throw "Module resource root not found, make sure it is listed in build/pom.xml" + path;
|
|
||||||
}
|
|
||||||
if(attributes.get("jandex") == "true" ) {
|
|
||||||
root = root + "\n\t<resource-root path=\"" + path.replace(".jar","-jandex.jar") + "\"/>";
|
|
||||||
}
|
|
||||||
project.setProperty("current.resource.root", root);
|
|
||||||
]]>
|
|
||||||
</scriptdef>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<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/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>1.3.1.Final</version>
|
|
||||||
<relativePath>../../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>keycloak-wf8-modules</artifactId>
|
|
||||||
|
|
||||||
<name>Keycloak Wildfly 8 Modules</name>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-adapter-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-jboss-adapter-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-undertow-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-wildfly-adapter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-wf8-subsystem</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-servlet-oauth-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpmime</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpcore</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<inherited>false</inherited>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>build-dist</id>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>compile</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<ant antfile="build.xml" inheritRefs="true">
|
|
||||||
<target name="all"/>
|
|
||||||
</ant>
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss</groupId>
|
|
||||||
<artifactId>jandex</artifactId>
|
|
||||||
<version>1.0.3.Final</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ant-contrib</groupId>
|
|
||||||
<artifactId>ant-contrib</artifactId>
|
|
||||||
<version>1.0b3</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>ant</groupId>
|
|
||||||
<artifactId>ant</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.ant</groupId>
|
|
||||||
<artifactId>ant-apache-bsf</artifactId>
|
|
||||||
<version>1.9.3</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.bsf</groupId>
|
|
||||||
<artifactId>bsf-api</artifactId>
|
|
||||||
<version>3.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>rhino</groupId>
|
|
||||||
<artifactId>js</artifactId>
|
|
||||||
<version>1.7R2</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>assemble</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>single</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<descriptors>
|
|
||||||
<descriptor>assembly.xml</descriptor>
|
|
||||||
</descriptors>
|
|
||||||
<outputDirectory>
|
|
||||||
target
|
|
||||||
</outputDirectory>
|
|
||||||
<workDirectory>
|
|
||||||
target/assembly/work
|
|
||||||
</workDirectory>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>copy-resources</id>
|
|
||||||
<!-- here the phase you need -->
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>copy-resources</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>${project.build.directory}/modules/org/keycloak/keycloak-adapter-subsystem</outputDirectory>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources/modules/org/keycloak/keycloak-adapter-subsystem</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="net.iharder.base64">
|
|
||||||
<resources>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
<dependencies>
|
|
||||||
<module name="javax.api"/>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</module>
|
|
||||||
-38
@@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
~ JBoss, Home of Professional Open Source.
|
|
||||||
~ Copyright 2014, Red Hat, Inc., and individual contributors
|
|
||||||
~ as indicated by the @author tags. See the copyright.txt file in the
|
|
||||||
~ distribution for a full listing of individual contributors.
|
|
||||||
~
|
|
||||||
~ This is free software; you can redistribute it and/or modify it
|
|
||||||
~ under the terms of the GNU Lesser General Public License as
|
|
||||||
~ published by the Free Software Foundation; either version 2.1 of
|
|
||||||
~ the License, or (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This software is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
~ Lesser General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU Lesser General Public
|
|
||||||
~ License along with this software; if not, write to the Free
|
|
||||||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-adapter-subsystem">
|
|
||||||
<properties>
|
|
||||||
<property name="keycloak-version" value="${project.version}"/>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<resource-root path="."/>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<module name="org.keycloak.keycloak-wf8-subsystem" export="true" services="export"/>
|
|
||||||
</dependencies>
|
|
||||||
</module>
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-core">
|
|
||||||
<resources>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
<dependencies>
|
|
||||||
<module name="org.codehaus.jackson.jackson-core-asl"/>
|
|
||||||
<module name="org.codehaus.jackson.jackson-mapper-asl"/>
|
|
||||||
<module name="org.codehaus.jackson.jackson-xc"/>
|
|
||||||
<module name="org.bouncycastle" />
|
|
||||||
<module name="net.iharder.base64"/>
|
|
||||||
<module name="javax.api"/>
|
|
||||||
<module name="javax.activation.api"/>
|
|
||||||
<module name="sun.jdk" optional="true" />
|
|
||||||
<module name="sun.jdk.jgss" optional="true" />
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</module>
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-jboss-adapter-core">
|
|
||||||
<resources>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
<dependencies>
|
|
||||||
<module name="javax.api"/>
|
|
||||||
<module name="org.jboss.logging"/>
|
|
||||||
<module name="org.picketbox"/>
|
|
||||||
<module name="org.keycloak.keycloak-adapter-core"/>
|
|
||||||
<module name="org.keycloak.keycloak-core"/>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</module>
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-servlet-oauth-client">
|
|
||||||
<resources>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
<dependencies>
|
|
||||||
<module name="javax.api"/>
|
|
||||||
<module name="javax.servlet.api"/>
|
|
||||||
<module name="org.jboss.logging"/>
|
|
||||||
<module name="org.picketbox"/>
|
|
||||||
<module name="org.apache.httpcomponents" slot="4.3"/>
|
|
||||||
<module name="org.keycloak.keycloak-adapter-core"/>
|
|
||||||
<module name="org.keycloak.keycloak-core"/>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</module>
|
|
||||||
-48
@@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
~ JBoss, Home of Professional Open Source.
|
|
||||||
~ Copyright 2014, Red Hat, Inc., and individual contributors
|
|
||||||
~ as indicated by the @author tags. See the copyright.txt file in the
|
|
||||||
~ distribution for a full listing of individual contributors.
|
|
||||||
~
|
|
||||||
~ This is free software; you can redistribute it and/or modify it
|
|
||||||
~ under the terms of the GNU Lesser General Public License as
|
|
||||||
~ published by the Free Software Foundation; either version 2.1 of
|
|
||||||
~ the License, or (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This software is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
~ Lesser General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU Lesser General Public
|
|
||||||
~ License along with this software; if not, write to the Free
|
|
||||||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-wf8-subsystem">
|
|
||||||
<properties>
|
|
||||||
<property name="keycloak-version" value="${project.version}"/>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<resource-root path="."/>
|
|
||||||
<!-- Insert resources here -->
|
|
||||||
</resources>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<module name="javax.api"/>
|
|
||||||
<module name="org.jboss.staxmapper"/>
|
|
||||||
<module name="org.jboss.as.controller"/>
|
|
||||||
<module name="org.jboss.as.ee"/>
|
|
||||||
<module name="org.jboss.as.server"/>
|
|
||||||
<module name="org.jboss.modules"/>
|
|
||||||
<module name="org.jboss.msc"/>
|
|
||||||
<module name="org.jboss.logging"/>
|
|
||||||
<module name="org.jboss.vfs"/>
|
|
||||||
<module name="org.jboss.as.web-common"/>
|
|
||||||
<module name="org.jboss.metadata"/>
|
|
||||||
</dependencies>
|
|
||||||
</module>
|
|
||||||
@@ -1,20 +0,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-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>1.3.1.Final</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<name>Keycloak Wildfly 9 Adapter</name>
|
|
||||||
<description/>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>keycloak-wf9-adapter-dist-pom</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>wf9-modules</module>
|
|
||||||
<module>wf9-adapter-zip</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<assembly>
|
|
||||||
<id>war-dist</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/unpacked</directory>
|
|
||||||
<includes>
|
|
||||||
<include>net/iharder/base64/**</include>
|
|
||||||
<include>org/keycloak/keycloak-core/**</include>
|
|
||||||
<include>org/keycloak/keycloak-adapter-core/**</include>
|
|
||||||
<include>org/keycloak/keycloak-jboss-adapter-core/**</include>
|
|
||||||
<include>org/keycloak/keycloak-undertow-adapter/**</include>
|
|
||||||
<include>org/keycloak/keycloak-wildfly-adapter/**</include>
|
|
||||||
<include>org/keycloak/keycloak-wf9-subsystem/**</include>
|
|
||||||
<include>org/keycloak/keycloak-adapter-subsystem/**</include>
|
|
||||||
<include>org/keycloak/keycloak-servlet-oauth-client/**</include>
|
|
||||||
</includes>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*.war</exclude>
|
|
||||||
</excludes>
|
|
||||||
<outputDirectory>modules/system/layers/base</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
</assembly>
|
|
||||||
Loaded 100 of 1281 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user