Merge pull request #53 from patriot1burke/master

model module refactor
This commit is contained in:
Bill Burke 2013-10-02 06:55:53 -07:00
commit 5943de4539
96 changed files with 449 additions and 276 deletions

View file

@ -30,6 +30,16 @@
<artifactId>keycloak-services</artifactId> <artifactId>keycloak-services</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-picketlink</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<artifactId>keycloak-social-core</artifactId> <artifactId>keycloak-social-core</artifactId>

View file

@ -4,12 +4,10 @@ import org.jboss.resteasy.jwt.JsonSerialization;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RequiredCredentialModel;
import org.keycloak.services.resources.KeycloakApplication; import org.keycloak.services.resources.KeycloakApplication;
import org.keycloak.services.resources.SaasService; import org.keycloak.services.resources.SaasService;
import org.keycloak.services.resources.SaasService;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;

View file

@ -18,8 +18,8 @@
<class>org.picketlink.idm.jpa.model.sample.simple.X509CredentialTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.X509CredentialTypeEntity</class>
<class>org.picketlink.idm.jpa.model.sample.simple.OTPCredentialTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.OTPCredentialTypeEntity</class>
<class>org.picketlink.idm.jpa.model.sample.simple.AttributeTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.AttributeTypeEntity</class>
<class>org.keycloak.services.models.picketlink.mappings.RealmEntity</class> <class>org.keycloak.models.picketlink.mappings.RealmEntity</class>
<class>org.keycloak.services.models.picketlink.mappings.ApplicationEntity</class> <class>org.keycloak.models.picketlink.mappings.ApplicationEntity</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes> <exclude-unlisted-classes>true</exclude-unlisted-classes>

View file

@ -18,6 +18,11 @@
<artifactId>keycloak-core</artifactId> <artifactId>keycloak-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<artifactId>keycloak-services</artifactId> <artifactId>keycloak-services</artifactId>

2
forms/src/main/java/org/keycloak/forms/LoginBean.java Normal file → Executable file
View file

@ -51,7 +51,7 @@ public class LoginBean {
} }
requiredCredentials = new LinkedList<RequiredCredential>(); requiredCredentials = new LinkedList<RequiredCredential>();
for (org.keycloak.services.models.RequiredCredentialModel c : realm.getRealm().getRequiredCredentials()) { for (org.keycloak.models.RequiredCredentialModel c : realm.getRealm().getRequiredCredentials()) {
if (c.isInput()) { if (c.isInput()) {
requiredCredentials.add(new RequiredCredential(c.getType(), c.isSecret(), c.getFormLabel())); requiredCredentials.add(new RequiredCredential(c.getType(), c.isSecret(), c.getFormLabel()));
} }

2
forms/src/main/java/org/keycloak/forms/RealmBean.java Normal file → Executable file
View file

@ -21,7 +21,7 @@
*/ */
package org.keycloak.forms; package org.keycloak.forms;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
/** /**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>

2
forms/src/main/java/org/keycloak/forms/UserBean.java Normal file → Executable file
View file

@ -21,7 +21,7 @@
*/ */
package org.keycloak.forms; package org.keycloak.forms;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
/** /**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>

30
model/api/pom.xml Executable file
View file

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<project>
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-alpha-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-model-api</artifactId>
<name>Keycloak Model API</name>
<description/>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;

View file

@ -0,0 +1,15 @@
package org.keycloak.models;
import java.util.concurrent.atomic.AtomicLong;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class IdGenerator {
private static AtomicLong counter = new AtomicLong(1);
public static String generateId() {
return counter.getAndIncrement() + "-" + System.currentTimeMillis();
}
}

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
import java.util.List; import java.util.List;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
import java.security.PrivateKey; import java.security.PrivateKey;
import java.security.PublicKey; import java.security.PublicKey;

View file

@ -1,6 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
import org.keycloak.representations.idm.CredentialRepresentation;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
@ -59,19 +57,19 @@ public class RequiredCredentialModel {
static { static {
Map<String, RequiredCredentialModel> map = new HashMap<String, RequiredCredentialModel>(); Map<String, RequiredCredentialModel> map = new HashMap<String, RequiredCredentialModel>();
PASSWORD = new RequiredCredentialModel(); PASSWORD = new RequiredCredentialModel();
PASSWORD.setType(CredentialRepresentation.PASSWORD); PASSWORD.setType(UserCredentialModel.PASSWORD);
PASSWORD.setInput(true); PASSWORD.setInput(true);
PASSWORD.setSecret(true); PASSWORD.setSecret(true);
PASSWORD.setFormLabel("password"); PASSWORD.setFormLabel("password");
map.put(PASSWORD.getType(), PASSWORD); map.put(PASSWORD.getType(), PASSWORD);
TOTP = new RequiredCredentialModel(); TOTP = new RequiredCredentialModel();
TOTP.setType(CredentialRepresentation.TOTP); TOTP.setType(UserCredentialModel.TOTP);
TOTP.setInput(true); TOTP.setInput(true);
TOTP.setSecret(false); TOTP.setSecret(false);
TOTP.setFormLabel("authenticatorCode"); TOTP.setFormLabel("authenticatorCode");
map.put(TOTP.getType(), TOTP); map.put(TOTP.getType(), TOTP);
CLIENT_CERT = new RequiredCredentialModel(); CLIENT_CERT = new RequiredCredentialModel();
CLIENT_CERT.setType(CredentialRepresentation.CLIENT_CERT); CLIENT_CERT.setType(UserCredentialModel.CLIENT_CERT);
CLIENT_CERT.setInput(false); CLIENT_CERT.setInput(false);
CLIENT_CERT.setSecret(false); CLIENT_CERT.setSecret(false);
CLIENT_CERT.setFormLabel("clientCertificate"); CLIENT_CERT.setFormLabel("clientCertificate");

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
/** /**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a> * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>

View file

@ -1,10 +1,13 @@
package org.keycloak.services.models; package org.keycloak.models;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */
public class UserCredentialModel { public class UserCredentialModel {
public static final String PASSWORD = "password";
public static final String TOTP = "totp";
public static final String CLIENT_CERT = "cert";
protected String type; protected String type;
protected String value; protected String value;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models; package org.keycloak.models;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.utils; package org.keycloak.models.utils;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.util.Arrays; import java.util.Arrays;

51
model/jpa/pom.xml Executable file
View file

@ -0,0 +1,51 @@
<?xml version="1.0"?>
<project>
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-alpha-1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-model-jpa</artifactId>
<name>Keycloak Model JPA</name>
<description/>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.jpa.entities; package org.keycloak.models.jpa.entities;
import javax.persistence.*; import javax.persistence.*;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.jpa.entities; package org.keycloak.models.jpa.entities;
import javax.persistence.Entity; import javax.persistence.Entity;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.jpa.entities; package org.keycloak.models.jpa.entities;
import javax.persistence.*; import javax.persistence.*;
import java.util.Collection; import java.util.Collection;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.jpa.entities; package org.keycloak.models.jpa.entities;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.jpa.entities; package org.keycloak.models.jpa.entities;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.jpa.entities; package org.keycloak.models.jpa.entities;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.jpa.entities; package org.keycloak.models.jpa.entities;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;

81
model/picketlink/pom.xml Executable file
View file

@ -0,0 +1,81 @@
<?xml version="1.0"?>
<project>
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-alpha-1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-model-picketlink</artifactId>
<name>Keycloak Model Picketlink</name>
<description/>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.picketlink</groupId>
<artifactId>picketlink-idm-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.picketlink</groupId>
<artifactId>picketlink-common</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.picketlink</groupId>
<artifactId>picketlink-idm-impl</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.picketlink</groupId>
<artifactId>picketlink-idm-simple-schema</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.picketlink</groupId>
<artifactId>picketlink-config</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -1,10 +1,10 @@
package org.keycloak.services.models.picketlink; package org.keycloak.models.picketlink;
import org.keycloak.services.models.ApplicationModel; import org.keycloak.models.ApplicationModel;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.picketlink.mappings.ApplicationData; import org.keycloak.models.picketlink.mappings.ApplicationData;
import org.keycloak.services.models.picketlink.relationships.ScopeRelationship; import org.keycloak.models.picketlink.relationships.ScopeRelationship;
import org.picketlink.idm.IdentityManager; import org.picketlink.idm.IdentityManager;
import org.picketlink.idm.PartitionManager; import org.picketlink.idm.PartitionManager;
import org.picketlink.idm.RelationshipManager; import org.picketlink.idm.RelationshipManager;

View file

@ -1,14 +1,11 @@
package org.keycloak.services.models.picketlink; package org.keycloak.models.picketlink;
import org.jboss.resteasy.spi.HttpRequest; import org.keycloak.models.KeycloakSession;
import org.jboss.resteasy.spi.NotImplementedYetException; import org.keycloak.models.KeycloakTransaction;
import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.UserModel;
import org.keycloak.services.models.KeycloakTransaction; import org.keycloak.models.picketlink.mappings.RealmData;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.picketlink.relationships.RealmAdminRelationship;
import org.keycloak.services.models.UserModel;
import org.keycloak.services.models.picketlink.mappings.RealmData;
import org.keycloak.services.models.picketlink.relationships.RealmAdminRelationship;
import org.picketlink.idm.PartitionManager; import org.picketlink.idm.PartitionManager;
import org.picketlink.idm.RelationshipManager; import org.picketlink.idm.RelationshipManager;
import org.picketlink.idm.query.RelationshipQuery; import org.picketlink.idm.query.RelationshipQuery;
@ -25,7 +22,6 @@ import java.util.concurrent.atomic.AtomicLong;
public class PicketlinkKeycloakSession implements KeycloakSession { public class PicketlinkKeycloakSession implements KeycloakSession {
public static ThreadLocal<EntityManager> currentEntityManager = new ThreadLocal<EntityManager>(); public static ThreadLocal<EntityManager> currentEntityManager = new ThreadLocal<EntityManager>();
public static ThreadLocal<Exception> setWhere = new ThreadLocal<Exception>(); public static ThreadLocal<Exception> setWhere = new ThreadLocal<Exception>();
public static ThreadLocal<String> setFromPath = new ThreadLocal<String>();
protected PartitionManager partitionManager; protected PartitionManager partitionManager;
protected EntityManager entityManager; protected EntityManager entityManager;
@ -40,14 +36,8 @@ public class PicketlinkKeycloakSession implements KeycloakSession {
if (currentEntityManager.get() != null) if (currentEntityManager.get() != null)
{ {
setWhere.get().printStackTrace(); setWhere.get().printStackTrace();
String path = setFromPath.get();
if (path == null) path = "???";
throw new IllegalStateException("Thread local was leaked! from path: " + path); throw new IllegalStateException("Thread local was leaked!");
}
HttpRequest request = ResteasyProviderFactory.getContextData(HttpRequest.class);
if (request != null) {
setFromPath.set(request.getUri().getPath());
} }
currentEntityManager.set(entityManager); currentEntityManager.set(entityManager);
setWhere.set(new Exception()); setWhere.set(new Exception());
@ -104,13 +94,12 @@ public class PicketlinkKeycloakSession implements KeycloakSession {
@Override @Override
public void deleteRealm(RealmModel realm) { public void deleteRealm(RealmModel realm) {
throw new NotImplementedYetException(); throw new RuntimeException("Not Implemented Yet");
} }
@Override @Override
public void close() { public void close() {
setFromPath.set(null);
setWhere.set(null); setWhere.set(null);
currentEntityManager.set(null); currentEntityManager.set(null);
if (entityManager.getTransaction().isActive()) entityManager.getTransaction().rollback(); if (entityManager.getTransaction().isActive()) entityManager.getTransaction().rollback();

View file

@ -1,7 +1,7 @@
package org.keycloak.services.models.picketlink; package org.keycloak.models.picketlink;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import org.picketlink.idm.PartitionManager; import org.picketlink.idm.PartitionManager;
import javax.persistence.EntityManagerFactory; import javax.persistence.EntityManagerFactory;

View file

@ -1,6 +1,6 @@
package org.keycloak.services.models.picketlink; package org.keycloak.models.picketlink;
import org.keycloak.services.models.KeycloakTransaction; import org.keycloak.models.KeycloakTransaction;
import javax.persistence.EntityTransaction; import javax.persistence.EntityTransaction;

View file

@ -1,22 +1,12 @@
package org.keycloak.services.models.picketlink; package org.keycloak.models.picketlink;
import org.bouncycastle.openssl.PEMWriter; import org.bouncycastle.openssl.PEMWriter;
import org.jboss.resteasy.logging.Logger; import org.keycloak.PemUtils;
import org.jboss.resteasy.security.PemUtils; import org.keycloak.models.*;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.models.picketlink.mappings.RealmData;
import org.keycloak.services.managers.RealmManager; import org.keycloak.models.picketlink.mappings.ApplicationData;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.picketlink.relationships.*;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.picketlink.relationships.RequiredApplicationCredentialRelationship;
import org.keycloak.services.models.RequiredCredentialModel;
import org.keycloak.services.models.ApplicationModel;
import org.keycloak.services.models.RoleModel;
import org.keycloak.services.models.SocialLinkModel;
import org.keycloak.services.models.UserCredentialModel;
import org.keycloak.services.models.UserModel;
import org.keycloak.services.models.picketlink.mappings.RealmData;
import org.keycloak.services.models.picketlink.mappings.ApplicationData;
import org.keycloak.services.models.picketlink.relationships.*;
import org.keycloak.services.models.picketlink.relationships.RequiredApplicationCredentialRelationship;
import org.picketlink.idm.IdentityManager; import org.picketlink.idm.IdentityManager;
import org.picketlink.idm.PartitionManager; import org.picketlink.idm.PartitionManager;
import org.picketlink.idm.RelationshipManager; import org.picketlink.idm.RelationshipManager;
@ -54,7 +44,6 @@ import java.util.Set;
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */
public class RealmAdapter implements RealmModel { public class RealmAdapter implements RealmModel {
protected static final Logger logger = Logger.getLogger(RealmManager.class);
protected RealmData realm; protected RealmData realm;
protected volatile transient PublicKey publicKey; protected volatile transient PublicKey publicKey;
@ -391,7 +380,6 @@ public class RealmAdapter implements RealmModel {
} }
} }
for (String cred : creds) { for (String cred : creds) {
logger.info("updating cred: " + cred);
if (!already.contains(cred)) { if (!already.contains(cred)) {
addRequiredCredential(cred); addRequiredCredential(cred);
} }
@ -483,14 +471,14 @@ public class RealmAdapter implements RealmModel {
@Override @Override
public void updateCredential(UserModel user, UserCredentialModel cred) { public void updateCredential(UserModel user, UserCredentialModel cred) {
IdentityManager idm = getIdm(); IdentityManager idm = getIdm();
if (cred.getType().equals(CredentialRepresentation.PASSWORD)) { if (cred.getType().equals(UserCredentialModel.PASSWORD)) {
Password password = new Password(cred.getValue()); Password password = new Password(cred.getValue());
idm.updateCredential(((UserAdapter)user).getUser(), password); idm.updateCredential(((UserAdapter)user).getUser(), password);
} else if (cred.getType().equals(CredentialRepresentation.TOTP)) { } else if (cred.getType().equals(UserCredentialModel.TOTP)) {
TOTPCredential totp = new TOTPCredential(cred.getValue()); TOTPCredential totp = new TOTPCredential(cred.getValue());
totp.setDevice(cred.getDevice()); totp.setDevice(cred.getDevice());
idm.updateCredential(((UserAdapter)user).getUser(), totp); idm.updateCredential(((UserAdapter)user).getUser(), totp);
} else if (cred.getType().equals(CredentialRepresentation.CLIENT_CERT)) { } else if (cred.getType().equals(UserCredentialModel.CLIENT_CERT)) {
X509Certificate cert = null; X509Certificate cert = null;
try { try {
cert = org.keycloak.PemUtils.decodeCertificate(cred.getValue()); cert = org.keycloak.PemUtils.decodeCertificate(cred.getValue());
@ -608,7 +596,7 @@ public class RealmAdapter implements RealmModel {
@Override @Override
public ApplicationModel addApplication(String name) { public ApplicationModel addApplication(String name) {
ApplicationData applicationData = new ApplicationData(RealmManager.generateId()); ApplicationData applicationData = new ApplicationData(IdGenerator.generateId());
User resourceUser = new User(name); User resourceUser = new User(name);
idm.add(resourceUser); idm.add(resourceUser);
applicationData.setResourceUser(resourceUser); applicationData.setResourceUser(resourceUser);
@ -704,7 +692,6 @@ public class RealmAdapter implements RealmModel {
@Override @Override
public boolean isRealmAdmin(UserModel agent) { public boolean isRealmAdmin(UserModel agent) {
RealmAdapter realmModel = (RealmAdapter)new RealmManager(session).defaultRealm();
RelationshipQuery<RealmAdminRelationship> query = getRelationshipManager().createRelationshipQuery(RealmAdminRelationship.class); RelationshipQuery<RealmAdminRelationship> query = getRelationshipManager().createRelationshipQuery(RealmAdminRelationship.class);
query.setParameter(RealmAdminRelationship.REALM, realm.getName()); query.setParameter(RealmAdminRelationship.REALM, realm.getName());
query.setParameter(RealmAdminRelationship.ADMIN, ((UserAdapter)agent).getUser()); query.setParameter(RealmAdminRelationship.ADMIN, ((UserAdapter)agent).getUser());

View file

@ -1,6 +1,6 @@
package org.keycloak.services.models.picketlink; package org.keycloak.models.picketlink;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.picketlink.idm.IdentityManager; import org.picketlink.idm.IdentityManager;
import org.picketlink.idm.model.Attribute; import org.picketlink.idm.model.Attribute;
import org.picketlink.idm.model.sample.Role; import org.picketlink.idm.model.sample.Role;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink; package org.keycloak.models.picketlink;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
@ -7,8 +7,8 @@ import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.utils.ArrayUtils; import org.keycloak.models.utils.ArrayUtils;
import org.picketlink.idm.IdentityManager; import org.picketlink.idm.IdentityManager;
import org.picketlink.idm.model.Attribute; import org.picketlink.idm.model.Attribute;
import org.picketlink.idm.model.sample.User; import org.picketlink.idm.model.sample.User;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.mappings; package org.keycloak.models.picketlink.mappings;
import org.picketlink.idm.model.AbstractPartition; import org.picketlink.idm.model.AbstractPartition;
import org.picketlink.idm.model.annotation.AttributeProperty; import org.picketlink.idm.model.annotation.AttributeProperty;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.mappings; package org.keycloak.models.picketlink.mappings;
import org.picketlink.idm.jpa.annotations.AttributeValue; import org.picketlink.idm.jpa.annotations.AttributeValue;
import org.picketlink.idm.jpa.annotations.OwnerReference; import org.picketlink.idm.jpa.annotations.OwnerReference;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.mappings; package org.keycloak.models.picketlink.mappings;
import org.picketlink.idm.model.AbstractPartition; import org.picketlink.idm.model.AbstractPartition;
import org.picketlink.idm.model.annotation.AttributeProperty; import org.picketlink.idm.model.annotation.AttributeProperty;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.mappings; package org.keycloak.models.picketlink.mappings;
import org.picketlink.idm.jpa.annotations.AttributeValue; import org.picketlink.idm.jpa.annotations.AttributeValue;
import org.picketlink.idm.jpa.annotations.OwnerReference; import org.picketlink.idm.jpa.annotations.OwnerReference;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.relationships; package org.keycloak.models.picketlink.relationships;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.relationships; package org.keycloak.models.picketlink.relationships;
import org.picketlink.idm.model.AbstractAttributedType; import org.picketlink.idm.model.AbstractAttributedType;
import org.picketlink.idm.model.Attribute; import org.picketlink.idm.model.Attribute;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.relationships; package org.keycloak.models.picketlink.relationships;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.relationships; package org.keycloak.models.picketlink.relationships;
import org.picketlink.idm.model.AbstractAttributedType; import org.picketlink.idm.model.AbstractAttributedType;
import org.picketlink.idm.model.Attribute; import org.picketlink.idm.model.Attribute;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.relationships; package org.keycloak.models.picketlink.relationships;
import org.picketlink.idm.model.AbstractAttributedType; import org.picketlink.idm.model.AbstractAttributedType;
import org.picketlink.idm.model.Attribute; import org.picketlink.idm.model.Attribute;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.relationships; package org.keycloak.models.picketlink.relationships;
import org.picketlink.idm.model.AbstractAttributedType; import org.picketlink.idm.model.AbstractAttributedType;
import org.picketlink.idm.model.Relationship; import org.picketlink.idm.model.Relationship;

View file

@ -1,4 +1,4 @@
package org.keycloak.services.models.picketlink.relationships; package org.keycloak.models.picketlink.relationships;
import org.picketlink.idm.model.AbstractAttributedType; import org.picketlink.idm.model.AbstractAttributedType;
import org.picketlink.idm.model.Attribute; import org.picketlink.idm.model.Attribute;

41
model/pom.xml Executable file
View file

@ -0,0 +1,41 @@
<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.0-alpha-1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Examples</name>
<description/>
<modelVersion>4.0.0</modelVersion>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-pom</artifactId>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.1.1.Final</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>api</module>
<module>picketlink</module>
<module>jpa</module>
</modules>
</project>

View file

@ -55,6 +55,7 @@
<modules> <modules>
<module>core</module> <module>core</module>
<module>model</module>
<module>services</module> <module>services</module>
<module>integration</module> <module>integration</module>
<module>social</module> <module>social</module>

View file

@ -24,6 +24,16 @@
<version>${project.version}</version> <version>${project.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-picketlink</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<artifactId>keycloak-social-core</artifactId> <artifactId>keycloak-social-core</artifactId>

View file

@ -25,8 +25,8 @@ import java.net.URI;
import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.MultivaluedMap;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.resources.flows.FormFlows; import org.keycloak.services.resources.flows.FormFlows;
/** /**

View file

@ -38,8 +38,8 @@ import javax.ws.rs.core.UriInfo;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.services.managers.AccessCodeEntry; import org.keycloak.services.managers.AccessCodeEntry;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.resources.AccountService; import org.keycloak.services.resources.AccountService;
import org.keycloak.services.resources.flows.Urls; import org.keycloak.services.resources.flows.Urls;

View file

@ -2,7 +2,7 @@ package org.keycloak.services.filters;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext; import javax.ws.rs.container.ContainerResponseContext;

View file

@ -2,8 +2,8 @@ package org.keycloak.services.filters;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.container.ContainerRequestFilter;

View file

@ -1,9 +1,9 @@
package org.keycloak.services.filters; package org.keycloak.services.filters;
import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.services.models.KeycloakTransaction; import org.keycloak.models.KeycloakTransaction;
import javax.servlet.*; import javax.servlet.*;
import java.io.IOException; import java.io.IOException;

View file

@ -1,9 +1,9 @@
package org.keycloak.services.managers; package org.keycloak.services.managers;
import org.keycloak.representations.SkeletonKeyToken; import org.keycloak.representations.SkeletonKeyToken;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import javax.ws.rs.core.MultivaluedHashMap; import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.MultivaluedMap;

View file

@ -9,9 +9,9 @@ import org.keycloak.RSATokenVerifier;
import org.keycloak.VerificationException; import org.keycloak.VerificationException;
import org.keycloak.representations.SkeletonKeyToken; import org.keycloak.representations.SkeletonKeyToken;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RequiredCredentialModel; import org.keycloak.models.RequiredCredentialModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.resources.RealmsResource; import org.keycloak.services.resources.RealmsResource;
import org.keycloak.services.resources.SaasService; import org.keycloak.services.resources.SaasService;

View file

@ -1,9 +1,9 @@
package org.keycloak.services.managers; package org.keycloak.services.managers;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.models.*;
import org.keycloak.representations.idm.*; import org.keycloak.representations.idm.*;
import org.keycloak.services.models.*; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.services.models.UserModel.RequiredAction;
import java.security.KeyPair; import java.security.KeyPair;
import java.security.KeyPairGenerator; import java.security.KeyPairGenerator;

View file

@ -5,8 +5,8 @@ import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.TokenIdGenerator; import org.keycloak.TokenIdGenerator;
import org.keycloak.representations.idm.admin.LogoutAction; import org.keycloak.representations.idm.admin.LogoutAction;
import org.keycloak.services.models.ApplicationModel; import org.keycloak.models.ApplicationModel;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import javax.ws.rs.client.Entity; import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Form; import javax.ws.rs.core.Form;

View file

@ -1,7 +1,7 @@
package org.keycloak.services.managers; package org.keycloak.services.managers;
import org.keycloak.models.*;
import org.keycloak.representations.idm.*; import org.keycloak.representations.idm.*;
import org.keycloak.services.models.*;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -5,10 +5,10 @@ import org.jboss.resteasy.jose.jws.JWSBuilder;
import org.jboss.resteasy.jwt.JsonSerialization; import org.jboss.resteasy.jwt.JsonSerialization;
import org.keycloak.representations.SkeletonKeyScope; import org.keycloak.representations.SkeletonKeyScope;
import org.keycloak.representations.SkeletonKeyToken; import org.keycloak.representations.SkeletonKeyToken;
import org.keycloak.services.models.ApplicationModel; import org.keycloak.models.ApplicationModel;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.MultivaluedMap;
import java.io.IOException; import java.io.IOException;

View file

@ -2,9 +2,9 @@ package org.keycloak.services.managers;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.representations.idm.UserRepresentation;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserCredentialModel; import org.keycloak.models.UserCredentialModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import java.util.Map; import java.util.Map;

View file

@ -46,10 +46,10 @@ import org.keycloak.services.managers.AccessCodeEntry;
import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.managers.TokenManager; import org.keycloak.services.managers.TokenManager;
import org.keycloak.services.messages.Messages; import org.keycloak.services.messages.Messages;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserCredentialModel; import org.keycloak.models.UserCredentialModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.services.resources.flows.Flows; import org.keycloak.services.resources.flows.Flows;
import org.keycloak.services.resources.flows.FormFlows; import org.keycloak.services.resources.flows.FormFlows;
import org.keycloak.services.validation.Validation; import org.keycloak.services.validation.Validation;

View file

@ -2,11 +2,11 @@ package org.keycloak.services.resources;
import org.keycloak.SkeletonKeyContextResolver; import org.keycloak.SkeletonKeyContextResolver;
import org.keycloak.services.managers.TokenManager; import org.keycloak.services.managers.TokenManager;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.services.models.picketlink.PicketlinkKeycloakSession; import org.keycloak.models.picketlink.PicketlinkKeycloakSession;
import org.keycloak.services.models.picketlink.PicketlinkKeycloakSessionFactory; import org.keycloak.models.picketlink.PicketlinkKeycloakSessionFactory;
import org.keycloak.services.models.picketlink.mappings.ApplicationEntity; import org.keycloak.models.picketlink.mappings.ApplicationEntity;
import org.keycloak.services.models.picketlink.mappings.RealmEntity; import org.keycloak.models.picketlink.mappings.RealmEntity;
import org.keycloak.social.SocialRequestManager; import org.keycloak.social.SocialRequestManager;
import org.picketlink.idm.PartitionManager; import org.picketlink.idm.PartitionManager;
import org.picketlink.idm.config.IdentityConfigurationBuilder; import org.picketlink.idm.config.IdentityConfigurationBuilder;

View file

@ -3,7 +3,7 @@ package org.keycloak.services.resources;
import org.jboss.resteasy.annotations.cache.NoCache; import org.jboss.resteasy.annotations.cache.NoCache;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.representations.idm.PublishedRealmRepresentation; import org.keycloak.representations.idm.PublishedRealmRepresentation;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;

View file

@ -3,8 +3,8 @@ package org.keycloak.services.resources;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.managers.TokenManager; import org.keycloak.services.managers.TokenManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import javax.ws.rs.NotFoundException; import javax.ws.rs.NotFoundException;
import javax.ws.rs.Path; import javax.ws.rs.Path;

View file

@ -5,13 +5,13 @@ import org.jboss.resteasy.logging.Logger;
import org.jboss.resteasy.spi.HttpRequest; import org.jboss.resteasy.spi.HttpRequest;
import org.jboss.resteasy.spi.HttpResponse; import org.jboss.resteasy.spi.HttpResponse;
import org.jboss.resteasy.spi.NotImplementedYetException; import org.jboss.resteasy.spi.NotImplementedYetException;
import org.keycloak.models.*;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.representations.idm.UserRepresentation;
import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.managers.AuthenticationManager.AuthenticationStatus; import org.keycloak.services.managers.AuthenticationManager.AuthenticationStatus;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.messages.Messages; import org.keycloak.services.messages.Messages;
import org.keycloak.services.models.*;
import org.keycloak.services.resources.admin.RealmsAdminResource; import org.keycloak.services.resources.admin.RealmsAdminResource;
import org.keycloak.services.resources.flows.Flows; import org.keycloak.services.resources.flows.Flows;
import org.keycloak.services.validation.Validation; import org.keycloak.services.validation.Validation;
@ -23,7 +23,6 @@ import javax.ws.rs.core.*;
import java.net.URI; import java.net.URI;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.StringTokenizer;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -32,7 +32,6 @@ import java.util.UUID;
import javax.imageio.spi.ServiceRegistry; import javax.imageio.spi.ServiceRegistry;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.POST; import javax.ws.rs.POST;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import javax.ws.rs.PathParam; import javax.ws.rs.PathParam;
@ -52,11 +51,10 @@ import org.jboss.resteasy.logging.Logger;
import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.jboss.resteasy.specimpl.MultivaluedMapImpl;
import org.jboss.resteasy.spi.HttpRequest; import org.jboss.resteasy.spi.HttpRequest;
import org.jboss.resteasy.spi.HttpResponse; import org.jboss.resteasy.spi.HttpResponse;
import org.keycloak.models.*;
import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.managers.TokenManager; import org.keycloak.services.managers.TokenManager;
import org.keycloak.services.messages.Messages;
import org.keycloak.services.models.*;
import org.keycloak.services.resources.flows.Flows; import org.keycloak.services.resources.flows.Flows;
import org.keycloak.services.resources.flows.OAuthFlows; import org.keycloak.services.resources.flows.OAuthFlows;
import org.keycloak.services.resources.flows.PageFlows; import org.keycloak.services.resources.flows.PageFlows;

View file

@ -8,6 +8,7 @@ import org.jboss.resteasy.jwt.JsonSerialization;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.jboss.resteasy.spi.HttpRequest; import org.jboss.resteasy.spi.HttpRequest;
import org.jboss.resteasy.spi.HttpResponse; import org.jboss.resteasy.spi.HttpResponse;
import org.keycloak.models.*;
import org.keycloak.representations.AccessTokenResponse; import org.keycloak.representations.AccessTokenResponse;
import org.keycloak.representations.SkeletonKeyToken; import org.keycloak.representations.SkeletonKeyToken;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
@ -18,8 +19,7 @@ import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.managers.ResourceAdminManager; import org.keycloak.services.managers.ResourceAdminManager;
import org.keycloak.services.managers.TokenManager; import org.keycloak.services.managers.TokenManager;
import org.keycloak.services.messages.Messages; import org.keycloak.services.messages.Messages;
import org.keycloak.services.models.*; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.services.models.UserModel.RequiredAction;
import org.keycloak.services.resources.flows.Flows; import org.keycloak.services.resources.flows.Flows;
import org.keycloak.services.resources.flows.OAuthFlows; import org.keycloak.services.resources.flows.OAuthFlows;
import org.keycloak.services.validation.Validation; import org.keycloak.services.validation.Validation;
@ -46,7 +46,6 @@ import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.StringTokenizer;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -1,8 +1,8 @@
package org.keycloak.services.resources; package org.keycloak.services.resources;
import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakTransaction; import org.keycloak.models.KeycloakTransaction;
/** /**
* Meant to be used as an inner class wrapper (I forget the pattern name, its been awhile). * Meant to be used as an inner class wrapper (I forget the pattern name, its been awhile).

View file

@ -2,11 +2,11 @@ package org.keycloak.services.resources.admin;
import org.jboss.resteasy.annotations.cache.NoCache; import org.jboss.resteasy.annotations.cache.NoCache;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.models.*;
import org.keycloak.representations.idm.ApplicationRepresentation; import org.keycloak.representations.idm.ApplicationRepresentation;
import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.representations.idm.RoleRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.managers.ResourceManager; import org.keycloak.services.managers.ResourceManager;
import org.keycloak.services.models.*;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;

View file

@ -5,10 +5,10 @@ import org.jboss.resteasy.logging.Logger;
import org.keycloak.representations.idm.ApplicationRepresentation; import org.keycloak.representations.idm.ApplicationRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.managers.ResourceManager; import org.keycloak.services.managers.ResourceManager;
import org.keycloak.services.models.ApplicationModel; import org.keycloak.models.ApplicationModel;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.container.ResourceContext; import javax.ws.rs.container.ResourceContext;

View file

@ -4,12 +4,11 @@ import org.jboss.resteasy.annotations.cache.NoCache;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.representations.idm.RoleRepresentation;
import org.keycloak.representations.idm.UserRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.container.ResourceContext; import javax.ws.rs.container.ResourceContext;
@ -17,9 +16,7 @@ import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo; import javax.ws.rs.core.UriInfo;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>

View file

@ -4,9 +4,9 @@ import org.jboss.resteasy.annotations.cache.NoCache;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.resources.SaasService; import org.keycloak.services.resources.SaasService;
import javax.ws.rs.*; import javax.ws.rs.*;

View file

@ -2,9 +2,9 @@ package org.keycloak.services.resources.admin;
import org.jboss.resteasy.annotations.cache.NoCache; import org.jboss.resteasy.annotations.cache.NoCache;
import org.jboss.resteasy.logging.Logger; import org.jboss.resteasy.logging.Logger;
import org.keycloak.models.*;
import org.keycloak.representations.idm.*; import org.keycloak.representations.idm.*;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.*;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.container.ResourceContext; import javax.ws.rs.container.ResourceContext;

View file

@ -24,7 +24,7 @@ package org.keycloak.services.resources.flows;
import org.jboss.resteasy.spi.HttpRequest; import org.jboss.resteasy.spi.HttpRequest;
import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.managers.TokenManager; import org.keycloak.services.managers.TokenManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import javax.ws.rs.core.UriInfo; import javax.ws.rs.core.UriInfo;

View file

@ -29,9 +29,9 @@ import org.jboss.resteasy.spi.ResteasyUriInfo;
import org.keycloak.services.FormService; import org.keycloak.services.FormService;
import org.keycloak.services.email.EmailSender; import org.keycloak.services.email.EmailSender;
import org.keycloak.services.managers.AccessCodeEntry; import org.keycloak.services.managers.AccessCodeEntry;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.picketlink.idm.model.sample.Realm; import org.picketlink.idm.model.sample.Realm;
import javax.imageio.spi.ServiceRegistry; import javax.imageio.spi.ServiceRegistry;

View file

@ -30,10 +30,10 @@ import org.keycloak.services.managers.AccessCodeEntry;
import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.managers.TokenManager; import org.keycloak.services.managers.TokenManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.services.resources.TokenService; import org.keycloak.services.resources.TokenService;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;

View file

@ -11,12 +11,12 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.AuthenticationManager.AuthenticationStatus; import org.keycloak.services.managers.AuthenticationManager.AuthenticationStatus;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserCredentialModel; import org.keycloak.models.UserCredentialModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.services.resources.KeycloakApplication; import org.keycloak.services.resources.KeycloakApplication;
import org.picketlink.idm.credential.util.TimeBasedOTP; import org.picketlink.idm.credential.util.TimeBasedOTP;

View file

@ -1,35 +0,0 @@
package org.keycloak.services.models.utils;
import org.junit.Assert;
import org.junit.Test;
public class ArrayUtilsTest {
@Test
public void add() {
String[] a = new String[] { "a" };
a = ArrayUtils.add(a, "b");
Assert.assertArrayEquals(new String[] { "a", "b" }, a);
a = ArrayUtils.add(a, "c");
Assert.assertArrayEquals(new String[] { "a", "b", "c" }, a);
}
@Test
public void remove() {
String[] a = new String[] { "a", "b", "c", "d" };
a = ArrayUtils.remove(a, "b");
Assert.assertArrayEquals(new String[] { "a", "c", "d" }, a);
a = ArrayUtils.remove(a, "d");
Assert.assertArrayEquals(new String[] { "a", "c" }, a);
a = ArrayUtils.remove(a, "a");
Assert.assertArrayEquals(new String[] { "c" }, a);
a = ArrayUtils.remove(a, "c");
Assert.assertArrayEquals(new String[] {}, a);
}
}

View file

@ -8,20 +8,18 @@ import org.junit.Test;
import org.junit.runners.MethodSorters; import org.junit.runners.MethodSorters;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RequiredCredentialModel; import org.keycloak.models.RequiredCredentialModel;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserCredentialModel; import org.keycloak.models.UserCredentialModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.services.resources.KeycloakApplication; import org.keycloak.services.resources.KeycloakApplication;
import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.StringTokenizer; import java.util.StringTokenizer;

View file

@ -9,14 +9,14 @@ import org.junit.runners.MethodSorters;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RequiredCredentialModel; import org.keycloak.models.RequiredCredentialModel;
import org.keycloak.services.models.ApplicationModel; import org.keycloak.models.ApplicationModel;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.models.SocialLinkModel; import org.keycloak.models.SocialLinkModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.resources.KeycloakApplication; import org.keycloak.services.resources.KeycloakApplication;
import org.keycloak.services.resources.SaasService; import org.keycloak.services.resources.SaasService;

View file

@ -2,9 +2,7 @@ package org.keycloak.test;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RequiredCredentialModel;
import org.keycloak.services.resources.SaasService;
import org.keycloak.services.resources.SaasService; import org.keycloak.services.resources.SaasService;
/** /**

View file

@ -9,10 +9,10 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.resources.KeycloakApplication; import org.keycloak.services.resources.KeycloakApplication;
public class ModelTest extends AbstractKeycloakServerTest { public class ModelTest extends AbstractKeycloakServerTest {

View file

@ -9,8 +9,8 @@ import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.representations.idm.UserRepresentation;
import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import javax.ws.rs.NotAuthorizedException; import javax.ws.rs.NotAuthorizedException;
import javax.ws.rs.client.Entity; import javax.ws.rs.client.Entity;

View file

@ -18,8 +18,8 @@
<class>org.picketlink.idm.jpa.model.sample.simple.X509CredentialTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.X509CredentialTypeEntity</class>
<class>org.picketlink.idm.jpa.model.sample.simple.OTPCredentialTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.OTPCredentialTypeEntity</class>
<class>org.picketlink.idm.jpa.model.sample.simple.AttributeTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.AttributeTypeEntity</class>
<class>org.keycloak.services.models.picketlink.mappings.RealmEntity</class> <class>org.keycloak.models.picketlink.mappings.RealmEntity</class>
<class>org.keycloak.services.models.picketlink.mappings.ApplicationEntity</class> <class>org.keycloak.models.picketlink.mappings.ApplicationEntity</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes> <exclude-unlisted-classes>true</exclude-unlisted-classes>

View file

@ -33,9 +33,9 @@ import org.junit.ClassRule;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.AppPage.RequestType; import org.keycloak.testsuite.pages.AppPage.RequestType;
import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.pages.LoginPage;

View file

@ -26,9 +26,9 @@ import org.junit.ClassRule;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.AppPage.RequestType; import org.keycloak.testsuite.pages.AppPage.RequestType;
import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.pages.LoginPage;

View file

@ -26,9 +26,9 @@ import org.junit.ClassRule;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.OAuthClient;
import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.AppPage.RequestType; import org.keycloak.testsuite.pages.AppPage.RequestType;

View file

@ -27,9 +27,9 @@ import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.AppPage.RequestType; import org.keycloak.testsuite.pages.AppPage.RequestType;
import org.keycloak.testsuite.pages.LoginConfigTotpPage; import org.keycloak.testsuite.pages.LoginConfigTotpPage;

View file

@ -26,9 +26,9 @@ import org.junit.ClassRule;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.models.UserModel.RequiredAction; import org.keycloak.models.UserModel.RequiredAction;
import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.AppPage.RequestType; import org.keycloak.testsuite.pages.AppPage.RequestType;
import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.pages.LoginPage;

View file

@ -28,9 +28,9 @@ import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserCredentialModel; import org.keycloak.models.UserCredentialModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.OAuthClient;
import org.keycloak.testsuite.pages.AccountPasswordPage; import org.keycloak.testsuite.pages.AccountPasswordPage;
import org.keycloak.testsuite.pages.AccountTotpPage; import org.keycloak.testsuite.pages.AccountTotpPage;

View file

@ -30,9 +30,9 @@ import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.UserCredentialModel; import org.keycloak.models.UserCredentialModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.AppPage.RequestType; import org.keycloak.testsuite.pages.AppPage.RequestType;
import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.pages.LoginPage;

View file

@ -42,11 +42,11 @@ import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.services.filters.KeycloakSessionServletFilter; import org.keycloak.services.filters.KeycloakSessionServletFilter;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import org.keycloak.services.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.services.models.RoleModel; import org.keycloak.models.RoleModel;
import org.keycloak.services.models.UserModel; import org.keycloak.models.UserModel;
import org.keycloak.services.resources.KeycloakApplication; import org.keycloak.services.resources.KeycloakApplication;
import org.keycloak.services.resources.SaasService; import org.keycloak.services.resources.SaasService;
import org.keycloak.testsuite.ApplicationServlet; import org.keycloak.testsuite.ApplicationServlet;

View file

@ -27,7 +27,7 @@ import org.junit.ClassRule;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.keycloak.services.managers.RealmManager; import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.models.RealmModel; import org.keycloak.models.RealmModel;
import org.keycloak.testsuite.DummySocialServlet; import org.keycloak.testsuite.DummySocialServlet;
import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.pages.LoginPage;

View file

@ -18,8 +18,8 @@
<class>org.picketlink.idm.jpa.model.sample.simple.X509CredentialTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.X509CredentialTypeEntity</class>
<class>org.picketlink.idm.jpa.model.sample.simple.OTPCredentialTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.OTPCredentialTypeEntity</class>
<class>org.picketlink.idm.jpa.model.sample.simple.AttributeTypeEntity</class> <class>org.picketlink.idm.jpa.model.sample.simple.AttributeTypeEntity</class>
<class>org.keycloak.services.models.picketlink.mappings.RealmEntity</class> <class>org.keycloak.models.picketlink.mappings.RealmEntity</class>
<class>org.keycloak.services.models.picketlink.mappings.ApplicationEntity</class> <class>org.keycloak.models.picketlink.mappings.ApplicationEntity</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes> <exclude-unlisted-classes>true</exclude-unlisted-classes>