Restructure of authentication module and packages

This commit is contained in:
mposolda 2014-04-08 12:27:05 +02:00
parent d5be56fa21
commit c8c4cfbaae
42 changed files with 71 additions and 78 deletions

View file

@ -1,14 +1,14 @@
<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">
<parent>
<artifactId>keycloak-spi</artifactId>
<artifactId>keycloak-authentication</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-beta-1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-authentication-spi</artifactId>
<artifactId>keycloak-authentication-api</artifactId>
<name>Keycloak Authentication SPI</name>
<description />

View file

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

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.authentication;
package org.keycloak.authentication;
/**
* Result of authentication by AuthenticationProvider

View file

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

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.authentication;
package org.keycloak.authentication;
import java.util.List;
import java.util.Map;

View file

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

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.authentication;
package org.keycloak.authentication;
import java.util.Collections;
import java.util.HashMap;

View file

@ -1,7 +1,7 @@
<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">
<parent>
<artifactId>keycloak-spi</artifactId>
<artifactId>keycloak-authentication</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-beta-1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
@ -27,7 +27,7 @@
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authentication-spi</artifactId>
<artifactId>keycloak-authentication-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.authentication.model;
package org.keycloak.authentication.model;
import java.util.Map;
@ -8,10 +8,10 @@ import org.keycloak.models.UserCredentialModel;
import org.keycloak.models.UserModel;
import org.keycloak.models.utils.KeycloakModelUtils;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.spi.authentication.AuthProviderStatus;
import org.keycloak.spi.authentication.AuthUser;
import org.keycloak.spi.authentication.AuthenticationProvider;
import org.keycloak.spi.authentication.AuthenticationProviderException;
import org.keycloak.authentication.AuthProviderStatus;
import org.keycloak.authentication.AuthUser;
import org.keycloak.authentication.AuthenticationProvider;
import org.keycloak.authentication.AuthenticationProviderException;
/**
* Authentication provider, which delegates calling of all methods to specified realm

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.authentication.model;
package org.keycloak.authentication.model;
import java.util.Arrays;
import java.util.List;
@ -7,10 +7,8 @@ import java.util.Map;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.UserModel;
import org.keycloak.spi.authentication.AuthProviderConstants;
import org.keycloak.spi.authentication.AuthUser;
import org.keycloak.spi.authentication.AuthenticationProviderException;
import org.keycloak.authentication.AuthProviderConstants;
import org.keycloak.authentication.AuthenticationProviderException;
/**
* AbstractModelAuthenticationProvider, which delegates authentication operations to different (external) realm

View file

@ -1,11 +1,11 @@
package org.keycloak.spi.authentication.model;
package org.keycloak.authentication.model;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.keycloak.models.RealmModel;
import org.keycloak.spi.authentication.AuthProviderConstants;
import org.keycloak.authentication.AuthProviderConstants;
/**
* AbstractModelAuthenticationProvider, which uses current realm to call operations on

View file

@ -0,0 +1,2 @@
org.keycloak.authentication.model.ModelAuthenticationProvider
org.keycloak.authentication.model.ExternalModelAuthenticationProvider

View file

@ -1,7 +1,7 @@
<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">
<parent>
<artifactId>keycloak-spi</artifactId>
<artifactId>keycloak-authentication</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-beta-1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
@ -27,7 +27,7 @@
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authentication-spi</artifactId>
<artifactId>keycloak-authentication-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.authentication.picketlink;
package org.keycloak.authentication.picketlink;
import java.util.Collections;
import java.util.List;
@ -7,12 +7,12 @@ import java.util.Map;
import org.jboss.logging.Logger;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.keycloak.models.RealmModel;
import org.keycloak.spi.authentication.AuthProviderStatus;
import org.keycloak.spi.authentication.AuthProviderConstants;
import org.keycloak.spi.authentication.AuthUser;
import org.keycloak.spi.authentication.AuthenticationProvider;
import org.keycloak.spi.authentication.AuthenticationProviderException;
import org.keycloak.spi.picketlink.PartitionManagerProvider;
import org.keycloak.authentication.AuthProviderStatus;
import org.keycloak.authentication.AuthProviderConstants;
import org.keycloak.authentication.AuthUser;
import org.keycloak.authentication.AuthenticationProvider;
import org.keycloak.authentication.AuthenticationProviderException;
import org.keycloak.picketlink.PartitionManagerProvider;
import org.keycloak.util.ProviderLoader;
import org.picketlink.idm.IdentityManagementException;
import org.picketlink.idm.IdentityManager;

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.picketlink;
package org.keycloak.picketlink;
import org.keycloak.models.RealmModel;
import org.picketlink.idm.PartitionManager;

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.picketlink.impl;
package org.keycloak.picketlink.impl;
import org.picketlink.idm.IdentityManager;
import org.picketlink.idm.ldap.internal.LDAPPlainTextPasswordCredentialHandler;

View file

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

View file

@ -1,4 +1,4 @@
package org.keycloak.spi.picketlink.impl;
package org.keycloak.picketlink.impl;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@ -8,7 +8,6 @@ import org.keycloak.models.RealmModel;
import org.picketlink.idm.PartitionManager;
import org.picketlink.idm.config.IdentityConfigurationBuilder;
import org.picketlink.idm.internal.DefaultPartitionManager;
import org.picketlink.idm.model.basic.Agent;
import org.picketlink.idm.model.basic.User;
import static org.picketlink.common.constants.LDAPConstants.CN;

View file

@ -1,10 +1,9 @@
package org.keycloak.spi.picketlink.impl;
package org.keycloak.picketlink.impl;
import org.jboss.logging.Logger;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.keycloak.models.RealmModel;
import org.keycloak.spi.picketlink.PartitionManagerProvider;
import org.keycloak.spi.picketlink.impl.PartitionManagerRegistry;
import org.keycloak.picketlink.PartitionManagerProvider;
import org.keycloak.util.KeycloakRegistry;
import org.picketlink.idm.PartitionManager;

View file

@ -0,0 +1 @@
org.keycloak.authentication.picketlink.PicketlinkAuthenticationProvider

View file

@ -0,0 +1 @@
org.keycloak.picketlink.impl.RealmPartitionManagerProvider

View file

@ -11,12 +11,12 @@
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<artifactId>keycloak-spi</artifactId>
<name>Keycloak SPI</name>
<artifactId>keycloak-authentication</artifactId>
<name>Keycloak Authentication</name>
<description />
<modules>
<module>authentication-spi</module>
<module>authentication-api</module>
<module>authentication-model</module>
<module>authentication-picketlink</module>
</modules>

View file

@ -23,7 +23,7 @@
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authentication-spi</artifactId>
<artifactId>keycloak-authentication-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>

View file

@ -17,7 +17,7 @@ import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import org.keycloak.models.RealmModel;
import org.keycloak.spi.picketlink.impl.LdapConstants;
import org.keycloak.picketlink.impl.LdapConstants;
import org.picketbox.test.ldap.AbstractLDAPTest;
/**

View file

@ -2,7 +2,7 @@ package org.keycloak.model.test;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.keycloak.models.RealmModel;
import org.keycloak.spi.authentication.picketlink.PicketlinkAuthenticationProvider;
import org.keycloak.authentication.picketlink.PicketlinkAuthenticationProvider;
import org.keycloak.util.KeycloakRegistry;
import org.picketlink.idm.IdentityManager;
import org.picketlink.idm.credential.Password;

View file

@ -10,7 +10,7 @@ import org.junit.Assert;
import org.junit.Test;
import org.keycloak.models.AuthenticationProviderModel;
import org.keycloak.models.RealmModel;
import org.keycloak.spi.authentication.AuthProviderConstants;
import org.keycloak.authentication.AuthProviderConstants;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>

View file

@ -5,7 +5,6 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;
@ -25,9 +24,9 @@ import org.keycloak.models.UserCredentialModel;
import org.keycloak.models.UserModel;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.spi.authentication.AuthProviderConstants;
import org.keycloak.spi.authentication.AuthenticationProviderException;
import org.keycloak.spi.authentication.AuthenticationProviderManager;
import org.keycloak.authentication.AuthProviderConstants;
import org.keycloak.authentication.AuthenticationProviderException;
import org.keycloak.authentication.AuthenticationProviderManager;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>

View file

@ -2,7 +2,6 @@ package org.keycloak.model.test;
import java.util.Arrays;
import java.util.Collections;
import java.util.Set;
import javax.ws.rs.core.MultivaluedMap;
@ -20,9 +19,9 @@ import org.keycloak.models.UserCredentialModel;
import org.keycloak.models.UserModel;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.spi.authentication.AuthProviderConstants;
import org.keycloak.spi.authentication.AuthenticationProviderException;
import org.keycloak.spi.authentication.AuthenticationProviderManager;
import org.keycloak.authentication.AuthProviderConstants;
import org.keycloak.authentication.AuthenticationProviderException;
import org.keycloak.authentication.AuthenticationProviderManager;
import org.keycloak.util.KeycloakRegistry;
/**

View file

@ -17,7 +17,7 @@ import org.keycloak.models.SocialLinkModel;
import org.keycloak.models.UserModel;
import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.services.managers.RealmManager;
import org.keycloak.spi.authentication.AuthProviderConstants;
import org.keycloak.authentication.AuthProviderConstants;
import java.util.List;
import java.util.Map;

View file

@ -86,6 +86,7 @@
<modules>
<module>audit</module>
<module>authentication</module>
<module>core</module>
<module>core-jaxrs</module>
<module>model</module>
@ -97,8 +98,7 @@
<module>examples</module>
<module>testsuite</module>
<module>server</module>
<module>spi</module>
<module>timer</module>
<module>timer</module>
</modules>
<dependencyManagement>

View file

@ -129,7 +129,7 @@
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authentication-spi</artifactId>
<artifactId>keycloak-authentication-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>

View file

@ -83,7 +83,7 @@
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authentication-spi</artifactId>
<artifactId>keycloak-authentication-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

View file

@ -16,9 +16,9 @@ import org.keycloak.representations.AccessToken;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.ClientConnection;
import org.keycloak.services.resources.RealmsResource;
import org.keycloak.spi.authentication.AuthProviderStatus;
import org.keycloak.spi.authentication.AuthUser;
import org.keycloak.spi.authentication.AuthenticationProviderManager;
import org.keycloak.authentication.AuthProviderStatus;
import org.keycloak.authentication.AuthUser;
import org.keycloak.authentication.AuthenticationProviderManager;
import org.keycloak.util.Time;
import javax.ws.rs.core.Cookie;

View file

@ -58,9 +58,9 @@ import org.keycloak.services.validation.Validation;
import org.keycloak.social.SocialLoader;
import org.keycloak.social.SocialProvider;
import org.keycloak.social.SocialProviderException;
import org.keycloak.spi.authentication.AuthProviderStatus;
import org.keycloak.spi.authentication.AuthenticationProviderException;
import org.keycloak.spi.authentication.AuthenticationProviderManager;
import org.keycloak.authentication.AuthProviderStatus;
import org.keycloak.authentication.AuthenticationProviderException;
import org.keycloak.authentication.AuthenticationProviderManager;
import javax.ws.rs.BadRequestException;
import javax.ws.rs.Consumes;
@ -80,7 +80,6 @@ import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.core.Variant;
import java.net.URI;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

View file

@ -46,8 +46,8 @@ import org.keycloak.services.managers.TokenManager;
import org.keycloak.services.messages.Messages;
import org.keycloak.services.resources.flows.Flows;
import org.keycloak.services.validation.Validation;
import org.keycloak.spi.authentication.AuthenticationProviderException;
import org.keycloak.spi.authentication.AuthenticationProviderManager;
import org.keycloak.authentication.AuthenticationProviderException;
import org.keycloak.authentication.AuthenticationProviderManager;
import org.keycloak.util.Time;
import javax.ws.rs.Consumes;

View file

@ -34,8 +34,8 @@ import org.keycloak.services.messages.Messages;
import org.keycloak.services.resources.flows.Flows;
import org.keycloak.services.resources.flows.OAuthFlows;
import org.keycloak.services.validation.Validation;
import org.keycloak.spi.authentication.AuthenticationProviderException;
import org.keycloak.spi.authentication.AuthenticationProviderManager;
import org.keycloak.authentication.AuthenticationProviderException;
import org.keycloak.authentication.AuthenticationProviderManager;
import org.keycloak.util.BasicAuthHelper;
import org.keycloak.util.Time;

View file

@ -5,8 +5,8 @@ import org.keycloak.freemarker.Theme;
import org.keycloak.freemarker.ThemeProvider;
import org.keycloak.services.ProviderSession;
import org.keycloak.social.SocialProvider;
import org.keycloak.spi.authentication.AuthenticationProvider;
import org.keycloak.spi.authentication.AuthenticationProviderManager;
import org.keycloak.authentication.AuthenticationProvider;
import org.keycloak.authentication.AuthenticationProviderManager;
import org.keycloak.util.ProviderLoader;
import javax.ws.rs.GET;

View file

@ -1,2 +0,0 @@
org.keycloak.spi.authentication.model.ModelAuthenticationProvider
org.keycloak.spi.authentication.model.ExternalModelAuthenticationProvider

View file

@ -1 +0,0 @@
org.keycloak.spi.authentication.picketlink.PicketlinkAuthenticationProvider

View file

@ -1 +0,0 @@
org.keycloak.spi.picketlink.impl.RealmPartitionManagerProvider

View file

@ -162,7 +162,7 @@
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authentication-spi</artifactId>
<artifactId>keycloak-authentication-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>

View file

@ -17,7 +17,7 @@ import org.keycloak.models.UserCredentialModel;
import org.keycloak.models.UserModel;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.services.managers.RealmManager;
import org.keycloak.spi.authentication.AuthProviderConstants;
import org.keycloak.authentication.AuthProviderConstants;
import org.keycloak.testsuite.OAuthClient;
import org.keycloak.testsuite.pages.AccountPasswordPage;
import org.keycloak.testsuite.pages.AccountUpdateProfilePage;