distro
This commit is contained in:
parent
a1b7297f25
commit
734bc5c902
73 changed files with 2070 additions and 1343 deletions
210
License.html
Executable file
210
License.html
Executable file
|
@ -0,0 +1,210 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||||
|
<pre>
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,50 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<assembly xmlns="urn:maven:assembly:1.1.0-SNAPSHOT">
|
|
||||||
<id>distro</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${build.target.dir}</directory>
|
|
||||||
<outputDirectory>keycloak-${project.version}</outputDirectory>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*.sh</exclude>
|
|
||||||
<exclude>domain/tmp/auth</exclude>
|
|
||||||
<exclude>standalone/tmp/auth</exclude>
|
|
||||||
<exclude>**/*-users.properties</exclude>
|
|
||||||
</excludes>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${build.target.dir}</directory>
|
|
||||||
<outputDirectory>keycloak-${project.version}</outputDirectory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.sh</include>
|
|
||||||
</includes>
|
|
||||||
<fileMode>0755</fileMode>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${build.target.dir}</directory>
|
|
||||||
<outputDirectory>keycloak-${project.version}</outputDirectory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*-users.properties</include>
|
|
||||||
</includes>
|
|
||||||
<fileMode>0600</fileMode>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${build.target.dir}</directory>
|
|
||||||
<outputDirectory>keycloak-${project.version}</outputDirectory>
|
|
||||||
<includes>
|
|
||||||
<include>domain/tmp/auth</include>
|
|
||||||
<include>standalone/tmp/auth</include>
|
|
||||||
</includes>
|
|
||||||
<directoryMode>0700</directoryMode>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
|
|
||||||
</assembly>
|
|
|
@ -1,37 +0,0 @@
|
||||||
<project name="keycloak-dist" basedir=".">
|
|
||||||
<target name="jboss">
|
|
||||||
<unzip src="${org.jboss.as:jboss-as-dist:zip}" dest="${project.build.directory}"/>
|
|
||||||
<chmod perm="755">
|
|
||||||
<fileset dir="${project.build.directory}/jboss-as-${jboss.version}/bin">
|
|
||||||
<include name="**/*.sh"/>
|
|
||||||
</fileset>
|
|
||||||
</chmod>
|
|
||||||
<move todir="${build.target.dir}" overwrite="true">
|
|
||||||
<fileset dir="${project.build.directory}/jboss-as-${jboss.version}">
|
|
||||||
<include name="**/*"/>
|
|
||||||
</fileset>
|
|
||||||
</move>
|
|
||||||
<delete dir="${project.build.directory}/jboss-as-${jboss.version}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="resteasy-modules">
|
|
||||||
<get src="http://sourceforge.net/projects/resteasy/files/Resteasy%20JAX-RS/${resteasy.version}/resteasy-jaxrs-${resteasy.version}-all.zip"
|
|
||||||
dest="${project.build.directory}" skipexisting="true"/>
|
|
||||||
<unzip src="${project.build.directory}/resteasy-jaxrs-${resteasy.version}-all.zip"
|
|
||||||
dest="${project.build.directory}">
|
|
||||||
<patternset>
|
|
||||||
<include name="resteasy-jaxrs-${resteasy.version}/resteasy-jboss-modules-${resteasy.version}.zip"/>
|
|
||||||
</patternset>
|
|
||||||
<mapper type="flatten"/>
|
|
||||||
</unzip>
|
|
||||||
<unzip src="${project.build.directory}/resteasy-jboss-modules-${resteasy.version}.zip"
|
|
||||||
dest="${build.target.dir}/modules"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="keycloak-server">
|
|
||||||
<copy file="${org.keycloak:keycloak-server:war}"
|
|
||||||
tofile="${build.target.dir}/standalone/deployments/auth-server.war" overwrite="true"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="all" depends="jboss, resteasy-modules, keycloak-server"/>
|
|
||||||
</project>
|
|
125
dist-as7/pom.xml
125
dist-as7/pom.xml
|
@ -1,125 +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>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>keycloak-dist-as7</artifactId>
|
|
||||||
<name>Keycloak Dist AS7</name>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<build.target.dir>${project.build.directory}/keycloak-${project.version}</build.target.dir>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release-as7</id>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-server</artifactId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
<type>war</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.as</groupId>
|
|
||||||
<artifactId>jboss-as-dist</artifactId>
|
|
||||||
<version>${jboss.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<skip>true</skip>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<version>1.7</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>build</id>
|
|
||||||
<phase>compile</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<ant antfile="build.xml" inheritRefs="false">
|
|
||||||
<target name="all"/>
|
|
||||||
</ant>
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>xml-maven-plugin</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>generate-resources</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>transform</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<transformationSets>
|
|
||||||
<transformationSet>
|
|
||||||
<dir>${build.target.dir}/standalone/configuration</dir>
|
|
||||||
<stylesheet>src/main/xslt/standalone.xsl</stylesheet>
|
|
||||||
<includes>
|
|
||||||
<include>standalone*.xml</include>
|
|
||||||
</includes>
|
|
||||||
<outputDir>${build.target.dir}/standalone/configuration</outputDir>
|
|
||||||
</transformationSet>
|
|
||||||
</transformationSets>
|
|
||||||
<targetDirectory>${project.build.directory}</targetDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<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>
|
|
||||||
<finalName>keycloak-${project.version}</finalName>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
<outputDirectory>target/</outputDirectory>
|
|
||||||
<workDirectory>target/assembly/work</workDirectory>
|
|
||||||
<tarLongFileMode>gnu</tarLongFileMode>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</project>
|
|
|
@ -1,33 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:xalan="http://xml.apache.org/xalan"
|
|
||||||
xmlns:j="urn:jboss:domain:1.3"
|
|
||||||
version="2.0"
|
|
||||||
exclude-result-prefixes="xalan j">
|
|
||||||
|
|
||||||
<xsl:param name="config"/>
|
|
||||||
|
|
||||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
|
|
||||||
<xsl:strip-space elements="*"/>
|
|
||||||
|
|
||||||
<xsl:template match="node()[name(.)='datasources']">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates select="node()|@*"/>
|
|
||||||
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
|
|
||||||
<connection-url>jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE</connection-url>
|
|
||||||
<driver>h2</driver>
|
|
||||||
<security>
|
|
||||||
<user-name>sa</user-name>
|
|
||||||
<password>sa</password>
|
|
||||||
</security>
|
|
||||||
</datasource>
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="@*|node()">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates select="@*|node()" />
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
50
dist/assembly.xml
vendored
50
dist/assembly.xml
vendored
|
@ -1,50 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<assembly xmlns="urn:maven:assembly:1.1.0-SNAPSHOT">
|
|
||||||
<id>distro</id>
|
|
||||||
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${build.target.dir}</directory>
|
|
||||||
<outputDirectory>keycloak-${project.version}</outputDirectory>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*.sh</exclude>
|
|
||||||
<exclude>domain/tmp/auth</exclude>
|
|
||||||
<exclude>standalone/tmp/auth</exclude>
|
|
||||||
<exclude>**/*-users.properties</exclude>
|
|
||||||
</excludes>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${build.target.dir}</directory>
|
|
||||||
<outputDirectory>keycloak-${project.version}</outputDirectory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.sh</include>
|
|
||||||
</includes>
|
|
||||||
<fileMode>0755</fileMode>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${build.target.dir}</directory>
|
|
||||||
<outputDirectory>keycloak-${project.version}</outputDirectory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*-users.properties</include>
|
|
||||||
</includes>
|
|
||||||
<fileMode>0600</fileMode>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${build.target.dir}</directory>
|
|
||||||
<outputDirectory>keycloak-${project.version}</outputDirectory>
|
|
||||||
<includes>
|
|
||||||
<include>domain/tmp/auth</include>
|
|
||||||
<include>standalone/tmp/auth</include>
|
|
||||||
</includes>
|
|
||||||
<directoryMode>0700</directoryMode>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
|
|
||||||
</assembly>
|
|
39
dist/build.xml
vendored
39
dist/build.xml
vendored
|
@ -1,39 +0,0 @@
|
||||||
<project name="keycloak-dist" basedir=".">
|
|
||||||
<target name="wildfly">
|
|
||||||
<unzip src="${org.wildfly:wildfly-dist:zip}" dest="${project.build.directory}"/>
|
|
||||||
<chmod perm="755">
|
|
||||||
<fileset dir="${project.build.directory}/wildfly-${wildfly.version}/bin">
|
|
||||||
<include name="**/*.sh"/>
|
|
||||||
</fileset>
|
|
||||||
</chmod>
|
|
||||||
<move todir="${build.target.dir}" overwrite="true">
|
|
||||||
<fileset dir="${project.build.directory}/wildfly-${wildfly.version}">
|
|
||||||
<include name="**/*"/>
|
|
||||||
</fileset>
|
|
||||||
</move>
|
|
||||||
<delete dir="${project.build.directory}/wildfly-${wildfly.version}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<target name="resteasy-modules">
|
|
||||||
<get src="http://sourceforge.net/projects/resteasy/files/Resteasy%20JAX-RS/${resteasy.version}/resteasy-jaxrs-${resteasy.version}-all.zip"
|
|
||||||
dest="${project.build.directory}" skipexisting="true"/>
|
|
||||||
<unzip src="${project.build.directory}/resteasy-jaxrs-${resteasy.version}-all.zip"
|
|
||||||
dest="${project.build.directory}">
|
|
||||||
<patternset>
|
|
||||||
<include name="resteasy-jaxrs-${resteasy.version}/resteasy-jboss-modules-${resteasy.version}.zip"/>
|
|
||||||
</patternset>
|
|
||||||
<mapper type="flatten"/>
|
|
||||||
</unzip>
|
|
||||||
<unzip src="${project.build.directory}/resteasy-jboss-modules-${resteasy.version}.zip"
|
|
||||||
dest="${build.target.dir}/modules"/>
|
|
||||||
</target>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<target name="keycloak-server">
|
|
||||||
<copy file="${org.keycloak:keycloak-server:war}"
|
|
||||||
tofile="${build.target.dir}/standalone/deployments/auth-server.war" overwrite="true"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="all" depends="wildfly, keycloak-server"/>
|
|
||||||
</project>
|
|
125
dist/pom.xml
vendored
125
dist/pom.xml
vendored
|
@ -1,125 +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>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>keycloak-dist</artifactId>
|
|
||||||
<name>Keycloak Dist</name>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<build.target.dir>${project.build.directory}/keycloak-${project.version}</build.target.dir>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release</id>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-server</artifactId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
<type>war</type>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.wildfly</groupId>
|
|
||||||
<artifactId>wildfly-dist</artifactId>
|
|
||||||
<version>${wildfly.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<skip>true</skip>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<version>1.7</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>build</id>
|
|
||||||
<phase>compile</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<ant antfile="build.xml" inheritRefs="false">
|
|
||||||
<target name="all"/>
|
|
||||||
</ant>
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>xml-maven-plugin</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>generate-resources</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>transform</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<transformationSets>
|
|
||||||
<transformationSet>
|
|
||||||
<dir>${build.target.dir}/standalone/configuration</dir>
|
|
||||||
<stylesheet>src/main/xslt/standalone.xsl</stylesheet>
|
|
||||||
<includes>
|
|
||||||
<include>standalone*.xml</include>
|
|
||||||
</includes>
|
|
||||||
<outputDir>${build.target.dir}/standalone/configuration</outputDir>
|
|
||||||
</transformationSet>
|
|
||||||
</transformationSets>
|
|
||||||
<targetDirectory>${project.build.directory}</targetDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<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>
|
|
||||||
<finalName>keycloak-${project.version}</finalName>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
<outputDirectory>target/</outputDirectory>
|
|
||||||
<workDirectory>target/assembly/work</workDirectory>
|
|
||||||
<tarLongFileMode>gnu</tarLongFileMode>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</project>
|
|
33
dist/src/main/xslt/standalone.xsl
vendored
33
dist/src/main/xslt/standalone.xsl
vendored
|
@ -1,33 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:xalan="http://xml.apache.org/xalan"
|
|
||||||
xmlns:j="urn:jboss:domain:1.3"
|
|
||||||
version="2.0"
|
|
||||||
exclude-result-prefixes="xalan j">
|
|
||||||
|
|
||||||
<xsl:param name="config"/>
|
|
||||||
|
|
||||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
|
|
||||||
<xsl:strip-space elements="*"/>
|
|
||||||
|
|
||||||
<xsl:template match="node()[name(.)='datasources']">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates select="node()|@*"/>
|
|
||||||
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
|
|
||||||
<connection-url>jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE</connection-url>
|
|
||||||
<driver>h2</driver>
|
|
||||||
<security>
|
|
||||||
<user-name>sa</user-name>
|
|
||||||
<password>sa</password>
|
|
||||||
</security>
|
|
||||||
</datasource>
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="@*|node()">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates select="@*|node()" />
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
66
distribution/appliance-dist/assembly.xml
Executable file
66
distribution/appliance-dist/assembly.xml
Executable file
|
@ -0,0 +1,66 @@
|
||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>true</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked/examples</directory>
|
||||||
|
<outputDirectory>examples</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked/wildfly-${wildfly.version}</directory>
|
||||||
|
<outputDirectory>keycloak</outputDirectory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/*.sh</exclude>
|
||||||
|
</excludes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked/wildfly-${wildfly.version}</directory>
|
||||||
|
<outputDirectory>keycloak</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.sh</include>
|
||||||
|
</includes>
|
||||||
|
<fileMode>0755</fileMode>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked/deployments</directory>
|
||||||
|
<outputDirectory>keycloak/standalone/deployments</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked/adapter</directory>
|
||||||
|
<outputDirectory>keycloak</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>false</useTransitiveDependencies>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-wildfly-adapter-dist:zip</include>
|
||||||
|
<include>org.keycloak:keycloak-as7-adapter-dist:zip</include>
|
||||||
|
<include>org.keycloak:keycloak-eap6-adapter-dist:zip</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>adapters</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
<!--
|
||||||
|
<moduleSets>
|
||||||
|
<moduleSet>
|
||||||
|
<useAllReactorProjects>true</useAllReactorProjects>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-wildfly-adapter-dist</include>
|
||||||
|
</includes>
|
||||||
|
<binaries>
|
||||||
|
<outputDirectory>adapters</outputDirectory>
|
||||||
|
<attachmentClassifier>zip</attachmentClassifier>
|
||||||
|
<includeDependencies>false</includeDependencies>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
</binaries>
|
||||||
|
</moduleSet>
|
||||||
|
</moduleSets>
|
||||||
|
-->
|
||||||
|
</assembly>
|
111
distribution/appliance-dist/pom.xml
Executable file
111
distribution/appliance-dist/pom.xml
Executable file
|
@ -0,0 +1,111 @@
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-appliance-dist-all</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak Appliance Distribution</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-as7-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<!--<version>2.7</version> -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-war-deployment</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-dist</artifactId>
|
||||||
|
<version>${wildfly.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-examples-docs-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked/adapter</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
31
distribution/as7-adapter-zip/assembly.xml
Executable file
31
distribution/as7-adapter-zip/assembly.xml
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked</directory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org/keycloak/keycloak-undertow-adapter/**</exclude>
|
||||||
|
</excludes>
|
||||||
|
<outputDirectory>modules</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<!--
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-as7-adapter</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>lib/as7-eap6-adapter</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
-->
|
||||||
|
</assembly>
|
77
distribution/as7-adapter-zip/pom.xml
Executable file
77
distribution/as7-adapter-zip/pom.xml
Executable file
|
@ -0,0 +1,77 @@
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-as7-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak AS7 Adapter Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-as7-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<!--<version>2.7</version> -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jboss-modules</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
31
distribution/eap6-adapter-zip/assembly.xml
Executable file
31
distribution/eap6-adapter-zip/assembly.xml
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked</directory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org/keycloak/keycloak-undertow-adapter/**</exclude>
|
||||||
|
</excludes>
|
||||||
|
<outputDirectory>modules/system/layers/base</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<!--
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-as7-adapter</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>lib/as7-eap6-adapter</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
-->
|
||||||
|
</assembly>
|
77
distribution/eap6-adapter-zip/pom.xml
Executable file
77
distribution/eap6-adapter-zip/pom.xml
Executable file
|
@ -0,0 +1,77 @@
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak EAP6 Adapter Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-as7-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<!--<version>2.7</version> -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jboss-modules</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
27
distribution/examples-docs-zip/assembly.xml
Executable file
27
distribution/examples-docs-zip/assembly.xml
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
<assembly>
|
||||||
|
<id>war-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>../../examples</directory>
|
||||||
|
<outputDirectory>examples</outputDirectory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/.svn/**</exclude>
|
||||||
|
<exclude>**/target/**</exclude>
|
||||||
|
<exclude>**/*.iml</exclude>
|
||||||
|
</excludes>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
47
distribution/examples-docs-zip/pom.xml
Executable file
47
distribution/examples-docs-zip/pom.xml
Executable file
|
@ -0,0 +1,47 @@
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-examples-docs-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak Examples and Doc Distribution</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
22
distribution/modules/assembly.xml
Executable file
22
distribution/modules/assembly.xml
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
<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>
|
76
distribution/modules/build.xml
Executable file
76
distribution/modules/build.xml
Executable file
|
@ -0,0 +1,76 @@
|
||||||
|
<!--
|
||||||
|
~ 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">
|
||||||
|
<!--
|
||||||
|
~ Complete list of modules to assemble.
|
||||||
|
~
|
||||||
|
~ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
~ +++++++ KEEP THIS LIST ALPHABETICAL BY MODULE NAME! +++++++
|
||||||
|
~ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
-->
|
||||||
|
|
||||||
|
<module-def name="org.bouncycastle">
|
||||||
|
<maven-resource group="org.bouncycastle" artifact="bcprov-jdk16"/>
|
||||||
|
</module-def>
|
||||||
|
|
||||||
|
<module-def name="org.keycloak.keycloak-core">
|
||||||
|
<maven-resource group="org.keycloak" artifact="keycloak-core"/>
|
||||||
|
</module-def>
|
||||||
|
|
||||||
|
<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-as7-adapter">
|
||||||
|
<maven-resource group="org.keycloak" artifact="keycloak-as7-adapter"/>
|
||||||
|
</module-def>
|
||||||
|
|
||||||
|
<module-def name="org.keycloak.keycloak-undertow-adapter">
|
||||||
|
<maven-resource group="org.keycloak" artifact="keycloak-undertow-adapter"/>
|
||||||
|
</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>
|
277
distribution/modules/lib.xml
Executable file
277
distribution/modules/lib.xml
Executable file
|
@ -0,0 +1,277 @@
|
||||||
|
<!--
|
||||||
|
~ 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" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
||||||
|
|
||||||
|
<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/>
|
||||||
|
|
||||||
|
<!-- 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">
|
||||||
|
<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">
|
||||||
|
<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">
|
||||||
|
<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">
|
||||||
|
<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>
|
138
distribution/modules/pom.xml
Executable file
138
distribution/modules/pom.xml
Executable file
|
@ -0,0 +1,138 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ 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 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.0-alpha-1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-jboss-modules</artifactId>
|
||||||
|
|
||||||
|
<name>Keycloak JBoss Modules</name>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-adapter-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-as7-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-undertow-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcprov-jdk16</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
<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>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<module xmlns="urn:jboss:module:1.1" name="org.bouncycastle">
|
||||||
|
<resources>
|
||||||
|
<!-- Insert resources here -->
|
||||||
|
</resources>
|
||||||
|
<dependencies>
|
||||||
|
<module name="javax.api"/>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</module>
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<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.keycloak.keycloak-core"/>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</module>
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-as7-adapter">
|
||||||
|
<resources>
|
||||||
|
<!-- Insert resources here -->
|
||||||
|
</resources>
|
||||||
|
<dependencies>
|
||||||
|
<module name="javax.api"/>
|
||||||
|
<module name="org.bouncycastle"/>
|
||||||
|
<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="javax.servlet.api"/>
|
||||||
|
<module name="org.jboss.logging"/>
|
||||||
|
<module name="org.jboss.as.security"/>
|
||||||
|
<module name="org.jboss.as.web"/>
|
||||||
|
<module name="org.picketbox"/>
|
||||||
|
<module name="org.keycloak.keycloak-adapter-core"/>
|
||||||
|
<module name="org.keycloak.keycloak-core" export="true"/>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</module>
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<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="javax.api"/>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</module>
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-undertow-adapter">
|
||||||
|
<resources>
|
||||||
|
<!-- Insert resources here -->
|
||||||
|
</resources>
|
||||||
|
<dependencies>
|
||||||
|
<module name="javax.api"/>
|
||||||
|
<module name="org.bouncycastle"/>
|
||||||
|
<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="javax.servlet.api"/>
|
||||||
|
<module name="org.jboss.logging"/>
|
||||||
|
<module name="io.undertow.core"/>
|
||||||
|
<module name="io.undertow.servlet"/>
|
||||||
|
<module name="org.keycloak.keycloak-adapter-core"/>
|
||||||
|
<module name="org.keycloak.keycloak-core" export="true"/>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</module>
|
38
distribution/pom.xml
Executable file
38
distribution/pom.xml
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
<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-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<name>Distribution</name>
|
||||||
|
<description/>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>distribution-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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<modules>
|
||||||
|
<module>modules</module>
|
||||||
|
<module>as7-adapter-zip</module>
|
||||||
|
<module>eap6-adapter-zip</module>
|
||||||
|
<module>wildfly-adapter-zip</module>
|
||||||
|
<module>examples-docs-zip</module>
|
||||||
|
<module>war-zip</module>
|
||||||
|
<module>war-dist</module>
|
||||||
|
<module>appliance-dist</module>
|
||||||
|
</modules>
|
||||||
|
</project>
|
43
distribution/war-dist/assembly.xml
Executable file
43
distribution/war-dist/assembly.xml
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>true</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked</directory>
|
||||||
|
<outputDirectory></outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>false</useTransitiveDependencies>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-wildfly-adapter-dist:zip</include>
|
||||||
|
<include>org.keycloak:keycloak-as7-adapter-dist:zip</include>
|
||||||
|
<include>org.keycloak:keycloak-eap6-adapter-dist:zip</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>adapters</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
<!--
|
||||||
|
<moduleSets>
|
||||||
|
<moduleSet>
|
||||||
|
<useAllReactorProjects>true</useAllReactorProjects>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-wildfly-adapter-dist</include>
|
||||||
|
</includes>
|
||||||
|
<binaries>
|
||||||
|
<outputDirectory>adapters</outputDirectory>
|
||||||
|
<attachmentClassifier>zip</attachmentClassifier>
|
||||||
|
<includeDependencies>false</includeDependencies>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
</binaries>
|
||||||
|
</moduleSet>
|
||||||
|
</moduleSets>
|
||||||
|
-->
|
||||||
|
</assembly>
|
113
distribution/war-dist/pom.xml
Executable file
113
distribution/war-dist/pom.xml
Executable file
|
@ -0,0 +1,113 @@
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-war-dist-all</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak WAR Distribution</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-as7-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<!--<version>2.7</version> -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-war-deployment</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
<!--
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-as7-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
-->
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-examples-docs-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
23
distribution/war-zip/assembly.xml
Executable file
23
distribution/war-zip/assembly.xml
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked</directory>
|
||||||
|
<outputDirectory></outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${basedir}</directory>
|
||||||
|
<includes>
|
||||||
|
<include>keycloak-ds.xml</include>
|
||||||
|
<include>auth-server.war.dodeploy</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>deployments</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
0
distribution/war-zip/auth-server.war.dodeploy
Executable file
0
distribution/war-zip/auth-server.war.dodeploy
Executable file
11
distribution/war-zip/keycloak-ds.xml
Executable file
11
distribution/war-zip/keycloak-ds.xml
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
|
||||||
|
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
|
||||||
|
<connection-url>jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE</connection-url>
|
||||||
|
<driver>h2</driver>
|
||||||
|
<security>
|
||||||
|
<user-name>sa</user-name>
|
||||||
|
<password>sa</password>
|
||||||
|
</security>
|
||||||
|
</datasource>
|
||||||
|
</datasources>
|
94
distribution/war-zip/pom.xml
Executable file
94
distribution/war-zip/pom.xml
Executable file
|
@ -0,0 +1,94 @@
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-war-deployment</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak WAR Deployment For Wildfly/AS7/EAP</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<!--<version>2.7</version> -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-server</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>war</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked/deployments/auth-server.war</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
||||||
|
<artifactId>replacer</artifactId>
|
||||||
|
<version>1.5.2</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>replace</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<file>${project.build.directory}/unpacked/deployments/auth-server.war/WEB-INF/classes/META-INF/persistence.xml</file>
|
||||||
|
<replacements>
|
||||||
|
<replacement>
|
||||||
|
<token>java:jboss/datasources/ExampleDS</token>
|
||||||
|
<value>java:jboss/datasources/KeycloakDS</value>
|
||||||
|
</replacement>
|
||||||
|
</replacements>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
32
distribution/wildfly-adapter-zip/assembly.xml
Executable file
32
distribution/wildfly-adapter-zip/assembly.xml
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked</directory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org/keycloak/keycloak-as7-adapter/**</exclude>
|
||||||
|
<exclude>org/bouncycastle/**</exclude>
|
||||||
|
</excludes>
|
||||||
|
<outputDirectory>modules/system/layers/base</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<!--
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-undertow-adapter</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>lib/wildfly-adapter</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
-->
|
||||||
|
</assembly>
|
78
distribution/wildfly-adapter-zip/pom.xml
Executable file
78
distribution/wildfly-adapter-zip/pom.xml
Executable file
|
@ -0,0 +1,78 @@
|
||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak Wildfly Adapter Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-undertow-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<!--<version>2.7</version> -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jboss-modules</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
|
@ -1,15 +1,14 @@
|
||||||
Login, Distributed SSO, Distributed Logout, and Oauth Token Grant AS7 Examples
|
Login, Distributed SSO, Distributed Logout, and Oauth Token Grant Wildfly Examples
|
||||||
===================================
|
===================================
|
||||||
The following examples requires JBoss AS7 or EAP 6.1, and Resteasy 3.0.2 and has been tested on version EAP 6.1. Here's the highlights of the examples
|
The following examples requires JBoss AS 7.1.1 or EAP 6.x. Here's the highlights of the examples
|
||||||
* Delegating authentication of a web app to the remote authentication server via OAuth 2 protocols
|
* Delegating authentication of a web app to the remote authentication server via OAuth 2 protocols
|
||||||
* Distributed Single-Sign-On and Single-Logout
|
* Distributed Single-Sign-On and Single-Logout
|
||||||
* Transferring identity and role mappings via a special bearer token (Skeleton Key Token).
|
* Transferring identity and role mappings via a special bearer token (Skeleton Key Token).
|
||||||
* Bearer token authentication and authorization of JAX-RS services
|
* Bearer token authentication and authorization of JAX-RS services
|
||||||
* Obtaining bearer tokens via the OAuth2 protocol
|
* Obtaining bearer tokens via the OAuth2 protocol
|
||||||
|
|
||||||
There are 5 WAR projects. These all will run on the same jboss instance, but pretend each one is running on a different
|
There are multiple WAR projects. These all will run on the same jboss instance, but pretend each one is running on a different
|
||||||
machine on the network or Internet.
|
machine on the network or Internet.
|
||||||
* **auth-server**: This is the keycloak SSO auth server
|
|
||||||
* **customer-app** A WAR applications that does remote login using OAUTH2 browser redirects with the auth server
|
* **customer-app** A WAR applications that does remote login using OAUTH2 browser redirects with the auth server
|
||||||
* **product-app** A WAR applications that does remote login using OAUTH2 browser redirects with the auth server
|
* **product-app** A WAR applications that does remote login using OAUTH2 browser redirects with the auth server
|
||||||
* **database-service** JAX-RS services authenticated by bearer tokens only. The customer and product app invoke on it
|
* **database-service** JAX-RS services authenticated by bearer tokens only. The customer and product app invoke on it
|
||||||
|
@ -18,17 +17,45 @@ machine on the network or Internet.
|
||||||
|
|
||||||
The UI of each of these applications is very crude and exists just to show our OAuth2 implementation in action.
|
The UI of each of these applications is very crude and exists just to show our OAuth2 implementation in action.
|
||||||
|
|
||||||
|
_This demo is meant to run on the same server instance as the Keycloak Server!_
|
||||||
|
|
||||||
Step 1: Make sure you've upgraded Resteasy
|
|
||||||
|
Step 1: Make sure you've set up the Keycloak Server and Adapter
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
The first thing you is upgrade Resteasy to 3.0.4 within JBoss as described [here](http://docs.jboss.org/resteasy/docs/3.0.4.Final/userguide/html/Installation_Configuration.html#upgrading-as7)
|
Obtain latest keycloak-war-dist-all.zip. This distro is used to install keycloak onto an existing JBoss installation
|
||||||
|
|
||||||
|
$ cd ${jboss.home}/standalone
|
||||||
|
$ cp -r ${keycloak-war-dist-all}/deployments .
|
||||||
|
|
||||||
|
To install the adapter if running JBoss 7.1.1
|
||||||
|
$ cd ${jboss.home}
|
||||||
|
$ unzip ${keycloak-war-dist-al}/adapters/keycloak-as7-adapter-dist.zip
|
||||||
|
|
||||||
|
To install the adapter if running on EAP 6.x
|
||||||
|
$ cd ${jboss.home}
|
||||||
|
$ unzip ${keycloak-war-dist-all}/adapters/keycloak-as7-adapter-dist.zip
|
||||||
|
|
||||||
|
|
||||||
Step 2: Boot JBoss
|
|
||||||
|
Step 2: Boot Keycloak Server
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
Boot JBoss in 'standalone' mode.
|
Where you go to start up the Keycloak Server depends on which distro you installed.
|
||||||
|
|
||||||
Step 3: Build and deploy
|
$ cd ${jboss.home}/bin
|
||||||
|
$ ./standalone.sh
|
||||||
|
|
||||||
|
Step 3: Import the Test Realm
|
||||||
|
---------------------------------------
|
||||||
|
Next thing you have to do is import the test realm for the demo. Clicking on the below link will bring you to the
|
||||||
|
create realm page in the admin UI. The username/password is admin/admin to login in. Keycloak will ask you to
|
||||||
|
create a new password admin password before you can go to the create realm page.
|
||||||
|
|
||||||
|
[http://localhost:8080/auth-server/admin/index.html#/create/realm](http://localhost:8080/auth-server/admin/index.html#/create/realm)
|
||||||
|
|
||||||
|
Import the testrealm.json file that is in the as7-eap6-demo/ example directory.
|
||||||
|
|
||||||
|
|
||||||
|
Step 4: Build and deploy
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
next you must build and deploy
|
next you must build and deploy
|
||||||
|
|
||||||
|
@ -36,7 +63,7 @@ next you must build and deploy
|
||||||
2. mvn clean install
|
2. mvn clean install
|
||||||
3. mvn jboss-as:deploy
|
3. mvn jboss-as:deploy
|
||||||
|
|
||||||
Step 4: Login and Observe Apps
|
Step 5: Login and Observe Apps
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
Try going to the customer app and viewing customer data:
|
Try going to the customer app and viewing customer data:
|
||||||
|
|
||||||
|
@ -49,7 +76,7 @@ are still happening, but the auth-server knows you are already logged in so the
|
||||||
|
|
||||||
If you click on the logout link of either of the product or customer app, you'll be logged out of all the applications.
|
If you click on the logout link of either of the product or customer app, you'll be logged out of all the applications.
|
||||||
|
|
||||||
Step 5: Traditional OAuth2 Example
|
Step 6: Traditional OAuth2 Example
|
||||||
----------------------------------
|
----------------------------------
|
||||||
The customer and product apps are logins. The third-party app is the traditional OAuth2 usecase of a client wanting
|
The customer and product apps are logins. The third-party app is the traditional OAuth2 usecase of a client wanting
|
||||||
to get permission to access a user's data. To run this example
|
to get permission to access a user's data. To run this example
|
||||||
|
@ -62,17 +89,11 @@ an oauth grant page. This page asks you if you want to grant certain permission
|
||||||
Admin Console
|
Admin Console
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
1. Register or login
|
1. Login
|
||||||
|
|
||||||
You'll have to first register and create an account
|
|
||||||
|
|
||||||
Login:
|
Login:
|
||||||
[http://localhost:8080/auth-server/rest/saas/login](http://localhost:8080/auth-server/rest/saas/login)
|
[http://localhost:8080/auth-server/rest/saas/login](http://localhost:8080/auth-server/rest/saas/login)
|
||||||
|
|
||||||
Register:
|
|
||||||
[http://localhost:8080/auth-server/rest/saas/registrations](http://localhost:8080/auth-server/rest/saas/registrations)
|
|
||||||
|
|
||||||
2. Next you'll be brought to the admin console. Click "New Realm" button and start doing stuff.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-as7-adapter</artifactId>
|
<artifactId>keycloak-as7-adapter</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
<jboss-deployment-structure>
|
<jboss-deployment-structure>
|
||||||
<deployment>
|
<deployment>
|
||||||
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- The keycloak-as7-adapter is required -->
|
||||||
|
<module name="org.keycloak.keycloak-as7-adapter"/>
|
||||||
|
<!-- the Demo code uses classes in these modules. These are optional to import if you are not using
|
||||||
|
Apache Http Client or the HttpClientBuilder that comes with the adapter core -->
|
||||||
|
<module name="org.apache.httpcomponents" />
|
||||||
|
<module name="org.keycloak.keycloak-adapter-core"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</deployment>
|
</deployment>
|
||||||
</jboss-deployment-structure>
|
</jboss-deployment-structure>
|
|
@ -39,14 +39,15 @@
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-as7-adapter</artifactId>
|
<artifactId>keycloak-as7-adapter</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
<!--
|
<!--
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
-->
|
-->
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
<deployment>
|
<deployment>
|
||||||
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- The keycloak-as7-adapter is required -->
|
||||||
|
<module name="org.keycloak.keycloak-as7-adapter"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</deployment>
|
</deployment>
|
||||||
</jboss-deployment-structure>
|
</jboss-deployment-structure>
|
|
@ -34,7 +34,6 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<modules>
|
<modules>
|
||||||
<module>server</module>
|
|
||||||
<module>customer-app</module>
|
<module>customer-app</module>
|
||||||
<module>product-app</module>
|
<module>product-app</module>
|
||||||
<module>database-service</module>
|
<module>database-service</module>
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-as7-adapter</artifactId>
|
<artifactId>keycloak-as7-adapter</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
<deployment>
|
<deployment>
|
||||||
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- The keycloak-as7-adapter is required -->
|
||||||
|
<module name="org.keycloak.keycloak-as7-adapter"/>
|
||||||
|
<!-- the Demo code uses classes in these modules. These are optional to import if you are not using
|
||||||
|
Apache Http Client or the HttpClientBuilder that comes with the adapter core -->
|
||||||
|
<module name="org.apache.httpcomponents" />
|
||||||
|
<module name="org.keycloak.keycloak-adapter-core"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</deployment>
|
</deployment>
|
||||||
</jboss-deployment-structure>
|
</jboss-deployment-structure>
|
|
@ -1,189 +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/maven-v4_0_0.xsd">
|
|
||||||
<parent>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.keycloak.example.as7.demo</groupId>
|
|
||||||
<artifactId>keycloak-server</artifactId>
|
|
||||||
<packaging>war</packaging>
|
|
||||||
<name>Keycloak Demo</name>
|
|
||||||
<description/>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk16</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-core</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-core-jaxrs</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-services</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-model-api</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-model-jpa</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-social-core</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-social-google</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-social-twitter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-social-facebook</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-forms</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-admin-ui</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-admin-ui-styles</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!--
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-jaxrs</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>log4j</groupId>
|
|
||||||
<artifactId>log4j</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-simple</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>jaxrs-api</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.h2database</groupId>
|
|
||||||
<artifactId>h2</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mongodb</groupId>
|
|
||||||
<artifactId>mongo-java-driver</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>de.flapdoodle.embed</groupId>
|
|
||||||
<artifactId>de.flapdoodle.embed.mongo</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>4.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.spec.javax.servlet</groupId>
|
|
||||||
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<!-- resteasy -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-jaxrs</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-multipart-provider</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-client</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>async-http-servlet-3.0</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>jaxrs-api</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-jackson-provider</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>auth-server</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jboss.as.plugins</groupId>
|
|
||||||
<artifactId>jboss-as-maven-plugin</artifactId>
|
|
||||||
<version>7.4.Final</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<skip>true</skip>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<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>
|
|
|
@ -1,46 +0,0 @@
|
||||||
package org.keycloak.example.demo;
|
|
||||||
|
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
import org.keycloak.representations.idm.RealmRepresentation;
|
|
||||||
import org.keycloak.services.managers.RealmManager;
|
|
||||||
import org.keycloak.services.resources.KeycloakApplication;
|
|
||||||
import org.keycloak.util.JsonSerialization;
|
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
|
||||||
import javax.ws.rs.core.Context;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class DemoApplication extends KeycloakApplication {
|
|
||||||
|
|
||||||
public DemoApplication(@Context ServletContext servletContext) {
|
|
||||||
super(servletContext);
|
|
||||||
KeycloakSession session = factory.createSession();
|
|
||||||
session.getTransaction().begin();
|
|
||||||
install(new RealmManager(session));
|
|
||||||
session.getTransaction().commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void install(RealmManager manager) {
|
|
||||||
RealmRepresentation rep = loadJson("META-INF/testrealm.json");
|
|
||||||
RealmModel realm = manager.createRealm("demo", rep.getRealm());
|
|
||||||
manager.importRealm(rep, realm);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static RealmRepresentation loadJson(String path)
|
|
||||||
{
|
|
||||||
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
|
|
||||||
try {
|
|
||||||
return JsonSerialization.readValue(is, RealmRepresentation.class);
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
|
||||||
version="1.0">
|
|
||||||
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
|
||||||
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
|
|
||||||
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationScopeMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationUserRoleMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmScopeMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmUserRoleMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RoleEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
|
||||||
|
|
||||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
|
|
||||||
<property name="hibernate.show_sql" value="false" />
|
|
||||||
<property name="hibernate.format_sql" value="false" />
|
|
||||||
</properties>
|
|
||||||
</persistence-unit>
|
|
||||||
|
|
||||||
</persistence>
|
|
|
@ -1,21 +0,0 @@
|
||||||
<jboss-deployment-structure>
|
|
||||||
<deployment>
|
|
||||||
<exclusions>
|
|
||||||
|
|
||||||
<!-- Exclude Version cxf of JBOSS -->
|
|
||||||
<module name="org.apache.cxf" />
|
|
||||||
<!-- Exclude JAVA EE of JBOSS (javax.ws..) => Add dependency javax.annotation -->
|
|
||||||
<module name="javaee.api" />
|
|
||||||
<!-- Exclude RestEasy conflict (javax.ws.rs.ext.RunDelegate) -->
|
|
||||||
<module name="org.jboss.resteasy.resteasy-atom-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-cdi" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jaxb-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jaxrs" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jettison-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jsapi" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-multipart-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-yaml-provider" />
|
|
||||||
</exclusions>
|
|
||||||
</deployment>
|
|
||||||
</jboss-deployment-structure>
|
|
|
@ -1,53 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
|
||||||
version="3.0">
|
|
||||||
|
|
||||||
<module-name>auth-server</module-name>
|
|
||||||
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>Resteasy</servlet-name>
|
|
||||||
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher</servlet-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>javax.ws.rs.Application</param-name>
|
|
||||||
<param-value>org.keycloak.example.demo.DemoApplication</param-value>
|
|
||||||
</init-param>
|
|
||||||
<init-param>
|
|
||||||
<param-name>resteasy.servlet.mapping.prefix</param-name>
|
|
||||||
<param-value>/rest</param-value>
|
|
||||||
</init-param>
|
|
||||||
<load-on-startup>1</load-on-startup>
|
|
||||||
<async-supported>true</async-supported>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.keycloak.services.listeners.KeycloakSessionDestroyListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<filter-name>Keycloak Session Management</filter-name>
|
|
||||||
<filter-class>org.keycloak.services.filters.KeycloakSessionServletFilter</filter-class>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>Keycloak Session Management</filter-name>
|
|
||||||
<url-pattern>/rest/*</url-pattern>
|
|
||||||
</filter-mapping>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>Resteasy</servlet-name>
|
|
||||||
<url-pattern>/rest/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<security-constraint>
|
|
||||||
<web-resource-collection>
|
|
||||||
<url-pattern>/*</url-pattern>
|
|
||||||
</web-resource-collection>
|
|
||||||
<user-data-constraint>
|
|
||||||
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
|
|
||||||
</user-data-constraint>
|
|
||||||
</security-constraint> -->
|
|
||||||
|
|
||||||
</web-app>
|
|
|
@ -1,15 +1,14 @@
|
||||||
Login, Distributed SSO, Distributed Logout, and Oauth Token Grant AS7 Examples
|
Login, Distributed SSO, Distributed Logout, and Oauth Token Grant Wildfly Examples
|
||||||
===================================
|
===================================
|
||||||
The following examples requires JBoss AS7 or EAP 6.1, and Resteasy 3.0.2 and has been tested on version EAP 6.1. Here's the highlights of the examples
|
The following examples requires Wildfly 8.0.0. Here's the highlights of the examples
|
||||||
* Delegating authentication of a web app to the remote authentication server via OAuth 2 protocols
|
* Delegating authentication of a web app to the remote authentication server via OAuth 2 protocols
|
||||||
* Distributed Single-Sign-On and Single-Logout
|
* Distributed Single-Sign-On and Single-Logout
|
||||||
* Transferring identity and role mappings via a special bearer token (Skeleton Key Token).
|
* Transferring identity and role mappings via a special bearer token (Skeleton Key Token).
|
||||||
* Bearer token authentication and authorization of JAX-RS services
|
* Bearer token authentication and authorization of JAX-RS services
|
||||||
* Obtaining bearer tokens via the OAuth2 protocol
|
* Obtaining bearer tokens via the OAuth2 protocol
|
||||||
|
|
||||||
There are 5 WAR projects. These all will run on the same jboss instance, but pretend each one is running on a different
|
There are multiple WAR projects. These all will run on the same jboss instance, but pretend each one is running on a different
|
||||||
machine on the network or Internet.
|
machine on the network or Internet.
|
||||||
* **auth-server**: This is the keycloak SSO auth server
|
|
||||||
* **customer-app** A WAR applications that does remote login using OAUTH2 browser redirects with the auth server
|
* **customer-app** A WAR applications that does remote login using OAUTH2 browser redirects with the auth server
|
||||||
* **product-app** A WAR applications that does remote login using OAUTH2 browser redirects with the auth server
|
* **product-app** A WAR applications that does remote login using OAUTH2 browser redirects with the auth server
|
||||||
* **database-service** JAX-RS services authenticated by bearer tokens only. The customer and product app invoke on it
|
* **database-service** JAX-RS services authenticated by bearer tokens only. The customer and product app invoke on it
|
||||||
|
@ -18,25 +17,51 @@ machine on the network or Internet.
|
||||||
|
|
||||||
The UI of each of these applications is very crude and exists just to show our OAuth2 implementation in action.
|
The UI of each of these applications is very crude and exists just to show our OAuth2 implementation in action.
|
||||||
|
|
||||||
|
_This demo is meant to run on the same server instance as the Keycloak Server!_
|
||||||
|
|
||||||
Step 1: Make sure you've upgraded Resteasy
|
|
||||||
|
Step 1: Make sure you've set up the Keycloak Server
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
The first thing you is upgrade Resteasy to 3.0.4 within JBoss as described [here](http://docs.jboss.org/resteasy/docs/3.0.4.Final/userguide/html/Installation_Configuration.html#upgrading-as7)
|
If you've downloaded the Keycloak Appliance Distribution, there is already a Wildfly distro all set up for you. This
|
||||||
|
Wildfly distro has the adapter jboss modules all installed as well as the keycloak server all set up.
|
||||||
|
|
||||||
|
If you want to install Keycloak Server and run the demo on an existing Wildfly instance:
|
||||||
|
|
||||||
Step 2: Boot JBoss
|
Obtain latest keycloak-war-dist-all.zip. This distro is used to install keycloak onto an existing JBoss installation
|
||||||
|
|
||||||
|
$ cd ${jboss.home}/standalone
|
||||||
|
$ cp -r ${keycloak-war-dist-all}/deployments .
|
||||||
|
|
||||||
|
To install the adapter:
|
||||||
|
$ cd ${jboss.home}
|
||||||
|
$ unzip ${keycloak-war-dist-al}/adapters/keycloak-wildfly-adapter-dist.zip
|
||||||
|
|
||||||
|
Step 2: Boot Keycloak Server
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
Boot JBoss in 'standalone' mode.
|
Where you go to start up the Keycloak Server depends on which distro you installed.
|
||||||
|
|
||||||
Step 3: Build and deploy
|
$ ./standalone.sh
|
||||||
|
|
||||||
|
Step 3: Import the Test Realm
|
||||||
|
---------------------------------------
|
||||||
|
Next thing you have to do is import the test realm for the demo. Clicking on the below link will bring you to the
|
||||||
|
create realm page in the admin UI. The username/password is admin/admin to login in. Keycloak will ask you to
|
||||||
|
create a new password admin password before you can go to the create realm page.
|
||||||
|
|
||||||
|
[http://localhost:8080/auth-server/admin/index.html#/create/realm](http://localhost:8080/auth-server/admin/index.html#/create/realm)
|
||||||
|
|
||||||
|
Import the testrealm.json file that is in the wildfly-demo/ example directory.
|
||||||
|
|
||||||
|
|
||||||
|
Step 4: Build and deploy
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
next you must build and deploy
|
next you must build and deploy
|
||||||
|
|
||||||
1. cd as7-eap-demo
|
1. cd wildfly-demo
|
||||||
2. mvn clean install
|
2. mvn clean install
|
||||||
3. mvn jboss-as:deploy
|
3. mvn jboss-as:deploy
|
||||||
|
|
||||||
Step 4: Login and Observe Apps
|
Step 5: Login and Observe Apps
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
Try going to the customer app and viewing customer data:
|
Try going to the customer app and viewing customer data:
|
||||||
|
|
||||||
|
@ -49,7 +74,7 @@ are still happening, but the auth-server knows you are already logged in so the
|
||||||
|
|
||||||
If you click on the logout link of either of the product or customer app, you'll be logged out of all the applications.
|
If you click on the logout link of either of the product or customer app, you'll be logged out of all the applications.
|
||||||
|
|
||||||
Step 5: Traditional OAuth2 Example
|
Step 6: Traditional OAuth2 Example
|
||||||
----------------------------------
|
----------------------------------
|
||||||
The customer and product apps are logins. The third-party app is the traditional OAuth2 usecase of a client wanting
|
The customer and product apps are logins. The third-party app is the traditional OAuth2 usecase of a client wanting
|
||||||
to get permission to access a user's data. To run this example
|
to get permission to access a user's data. To run this example
|
||||||
|
@ -62,17 +87,11 @@ an oauth grant page. This page asks you if you want to grant certain permission
|
||||||
Admin Console
|
Admin Console
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
1. Register or login
|
1. Login
|
||||||
|
|
||||||
You'll have to first register and create an account
|
|
||||||
|
|
||||||
Login:
|
Login:
|
||||||
[http://localhost:8080/auth-server/rest/saas/login](http://localhost:8080/auth-server/rest/saas/login)
|
[http://localhost:8080/auth-server/rest/saas/login](http://localhost:8080/auth-server/rest/saas/login)
|
||||||
|
|
||||||
Register:
|
|
||||||
[http://localhost:8080/auth-server/rest/saas/registrations](http://localhost:8080/auth-server/rest/saas/registrations)
|
|
||||||
|
|
||||||
2. Next you'll be brought to the admin console. Click "New Realm" button and start doing stuff.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-undertow-adapter</artifactId>
|
<artifactId>keycloak-undertow-adapter</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
<jboss-deployment-structure>
|
<jboss-deployment-structure>
|
||||||
<deployment>
|
<deployment>
|
||||||
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- The keycloak-undertow-adapter is required -->
|
||||||
|
<module name="org.keycloak.keycloak-undertow-adapter" services="import"/>
|
||||||
|
<!-- the Demo code uses classes in these modules. These are optional to import if you are not using
|
||||||
|
Apache Http Client or the HttpClientBuilder that comes with the adapter core -->
|
||||||
|
<module name="org.apache.httpcomponents" />
|
||||||
|
<module name="org.keycloak.keycloak-adapter-core"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</deployment>
|
</deployment>
|
||||||
</jboss-deployment-structure>
|
</jboss-deployment-structure>
|
|
@ -39,6 +39,7 @@
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-undertow-adapter</artifactId>
|
<artifactId>keycloak-undertow-adapter</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
<!--
|
<!--
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<jboss-deployment-structure>
|
<jboss-deployment-structure>
|
||||||
<deployment>
|
<deployment>
|
||||||
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- The keycloak-undertow-adapter is required -->
|
||||||
|
<module name="org.keycloak.keycloak-undertow-adapter" services="import"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</deployment>
|
</deployment>
|
||||||
</jboss-deployment-structure>
|
</jboss-deployment-structure>
|
|
@ -34,7 +34,7 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<modules>
|
<modules>
|
||||||
<module>server</module>
|
<!-- <module>server</module> -->
|
||||||
<module>customer-app</module>
|
<module>customer-app</module>
|
||||||
<module>product-app</module>
|
<module>product-app</module>
|
||||||
<module>database-service</module>
|
<module>database-service</module>
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-undertow-adapter</artifactId>
|
<artifactId>keycloak-undertow-adapter</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
<jboss-deployment-structure>
|
<jboss-deployment-structure>
|
||||||
<deployment>
|
<deployment>
|
||||||
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- The keycloak-undertow-adapter is required -->
|
||||||
|
<module name="org.keycloak.keycloak-undertow-adapter" services="import"/>
|
||||||
|
<!-- the Demo code uses classes in these modules. These are optional to import if you are not using
|
||||||
|
Apache Http Client or the HttpClientBuilder that comes with the adapter core -->
|
||||||
|
<module name="org.apache.httpcomponents" />
|
||||||
|
<module name="org.keycloak.keycloak-adapter-core"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</deployment>
|
</deployment>
|
||||||
</jboss-deployment-structure>
|
</jboss-deployment-structure>
|
|
@ -1,189 +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/maven-v4_0_0.xsd">
|
|
||||||
<parent>
|
|
||||||
<artifactId>keycloak-parent</artifactId>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
|
||||||
<relativePath>../../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>org.keycloak.example.wildfly.demo</groupId>
|
|
||||||
<artifactId>keycloak-server</artifactId>
|
|
||||||
<packaging>war</packaging>
|
|
||||||
<name>Keycloak Demo</name>
|
|
||||||
<description/>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk16</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-core</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-core-jaxrs</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-services</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-model-api</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-model-jpa</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-social-core</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-social-google</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-social-twitter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-social-facebook</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-forms</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-admin-ui</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-admin-ui-styles</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!--
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-jaxrs</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>log4j</groupId>
|
|
||||||
<artifactId>log4j</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-simple</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>jaxrs-api</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.h2database</groupId>
|
|
||||||
<artifactId>h2</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mongodb</groupId>
|
|
||||||
<artifactId>mongo-java-driver</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>de.flapdoodle.embed</groupId>
|
|
||||||
<artifactId>de.flapdoodle.embed.mongo</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>4.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.spec.javax.servlet</groupId>
|
|
||||||
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<!-- resteasy -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-jaxrs</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-multipart-provider</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-client</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>async-http-servlet-3.0</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>jaxrs-api</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
|
||||||
<artifactId>resteasy-jackson-provider</artifactId>
|
|
||||||
<version>${resteasy.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>auth-server</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jboss.as.plugins</groupId>
|
|
||||||
<artifactId>jboss-as-maven-plugin</artifactId>
|
|
||||||
<version>7.4.Final</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<skip>true</skip>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<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>
|
|
|
@ -1,46 +0,0 @@
|
||||||
package org.keycloak.example.demo;
|
|
||||||
|
|
||||||
import org.keycloak.models.KeycloakSession;
|
|
||||||
import org.keycloak.models.RealmModel;
|
|
||||||
import org.keycloak.representations.idm.RealmRepresentation;
|
|
||||||
import org.keycloak.services.managers.RealmManager;
|
|
||||||
import org.keycloak.services.resources.KeycloakApplication;
|
|
||||||
import org.keycloak.util.JsonSerialization;
|
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
|
||||||
import javax.ws.rs.core.Context;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
/**
|
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
||||||
* @version $Revision: 1 $
|
|
||||||
*/
|
|
||||||
public class DemoApplication extends KeycloakApplication {
|
|
||||||
|
|
||||||
public DemoApplication(@Context ServletContext servletContext) {
|
|
||||||
super(servletContext);
|
|
||||||
KeycloakSession session = factory.createSession();
|
|
||||||
session.getTransaction().begin();
|
|
||||||
install(new RealmManager(session));
|
|
||||||
session.getTransaction().commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void install(RealmManager manager) {
|
|
||||||
RealmRepresentation rep = loadJson("META-INF/testrealm.json");
|
|
||||||
RealmModel realm = manager.createRealm("demo", rep.getRealm());
|
|
||||||
manager.importRealm(rep, realm);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static RealmRepresentation loadJson(String path)
|
|
||||||
{
|
|
||||||
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
|
|
||||||
try {
|
|
||||||
return JsonSerialization.readValue(is, RealmRepresentation.class);
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
|
||||||
version="1.0">
|
|
||||||
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
|
||||||
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
|
|
||||||
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationScopeMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationUserRoleMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmScopeMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmUserRoleMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RoleEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
|
||||||
|
|
||||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
|
|
||||||
<property name="hibernate.show_sql" value="false" />
|
|
||||||
<property name="hibernate.format_sql" value="false" />
|
|
||||||
</properties>
|
|
||||||
</persistence-unit>
|
|
||||||
|
|
||||||
</persistence>
|
|
|
@ -1,31 +0,0 @@
|
||||||
<jboss-deployment-structure>
|
|
||||||
<deployment>
|
|
||||||
<!--
|
|
||||||
<exclude-subsystems>
|
|
||||||
<subsystem name="jaxrs" />
|
|
||||||
</exclude-subsystems>
|
|
||||||
-->
|
|
||||||
<exclusions>
|
|
||||||
|
|
||||||
<!-- Exclude Version cxf of JBOSS -->
|
|
||||||
<module name="org.apache.cxf" />
|
|
||||||
<!-- Exclude JAVA EE of JBOSS (javax.ws..) => Add dependency javax.annotation -->
|
|
||||||
<module name="javaee.api" />
|
|
||||||
<module name="javax.ws.rs.api"/>
|
|
||||||
<!-- Exclude RestEasy conflict (javax.ws.rs.ext.RunDelegate) -->
|
|
||||||
<module name="org.codehaus.jackson.jackson-core-asl" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-atom-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-cdi" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-crypto" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jaxb-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jaxrs" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jettison-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-json-p-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-jsapi" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-multipart-provider" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-validator-provider-11" />
|
|
||||||
<module name="org.jboss.resteasy.resteasy-yaml-provider" />
|
|
||||||
</exclusions>
|
|
||||||
</deployment>
|
|
||||||
</jboss-deployment-structure>
|
|
|
@ -1,53 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
|
||||||
version="3.0">
|
|
||||||
|
|
||||||
<module-name>auth-server</module-name>
|
|
||||||
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>Resteasy</servlet-name>
|
|
||||||
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher</servlet-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>javax.ws.rs.Application</param-name>
|
|
||||||
<param-value>org.keycloak.example.demo.DemoApplication</param-value>
|
|
||||||
</init-param>
|
|
||||||
<init-param>
|
|
||||||
<param-name>resteasy.servlet.mapping.prefix</param-name>
|
|
||||||
<param-value>/rest</param-value>
|
|
||||||
</init-param>
|
|
||||||
<load-on-startup>1</load-on-startup>
|
|
||||||
<async-supported>true</async-supported>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.keycloak.services.listeners.KeycloakSessionDestroyListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<filter-name>Keycloak Session Management</filter-name>
|
|
||||||
<filter-class>org.keycloak.services.filters.KeycloakSessionServletFilter</filter-class>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>Keycloak Session Management</filter-name>
|
|
||||||
<url-pattern>/rest/*</url-pattern>
|
|
||||||
</filter-mapping>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>Resteasy</servlet-name>
|
|
||||||
<url-pattern>/rest/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<security-constraint>
|
|
||||||
<web-resource-collection>
|
|
||||||
<url-pattern>/*</url-pattern>
|
|
||||||
</web-resource-collection>
|
|
||||||
<user-data-constraint>
|
|
||||||
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
|
|
||||||
</user-data-constraint>
|
|
||||||
</security-constraint> -->
|
|
||||||
|
|
||||||
</web-app>
|
|
|
@ -42,7 +42,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>${apache.httpcomponents.version}</version>
|
<version>${keycloak.apache.httpcomponents.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -13,12 +13,6 @@
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.logging</groupId>
|
|
||||||
<artifactId>jboss-logging</artifactId>
|
|
||||||
<version>3.1.2.GA</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-core</artifactId>
|
<artifactId>keycloak-core</artifactId>
|
||||||
|
@ -32,7 +26,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>${apache.httpcomponents.version}</version>
|
<version>${keycloak.apache.httpcomponents.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
@ -55,6 +49,12 @@
|
||||||
<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>
|
||||||
|
<groupId>org.jboss.logging</groupId>
|
||||||
|
<artifactId>jboss-logging</artifactId>
|
||||||
|
<version>3.1.2.GA</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.web</groupId>
|
<groupId>org.jboss.web</groupId>
|
||||||
<artifactId>jbossweb</artifactId>
|
<artifactId>jbossweb</artifactId>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>${apache.httpcomponents.version}</version>
|
<version>${keycloak.apache.httpcomponents.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>${apache.httpcomponents.version}</version>
|
<version>${keycloak.apache.httpcomponents.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
|
10
pom.xml
10
pom.xml
|
@ -12,7 +12,7 @@
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<apache.httpcomponents.version>4.1.2</apache.httpcomponents.version>
|
<keycloak.apache.httpcomponents.version>4.1.2</keycloak.apache.httpcomponents.version>
|
||||||
<resteasy.version>3.0.5.Final</resteasy.version>
|
<resteasy.version>3.0.5.Final</resteasy.version>
|
||||||
<undertow.version>1.0.0.Beta28</undertow.version>
|
<undertow.version>1.0.0.Beta28</undertow.version>
|
||||||
<picketlink.version>2.5.0.Beta6</picketlink.version>
|
<picketlink.version>2.5.0.Beta6</picketlink.version>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<mysql.version>5.1.25</mysql.version>
|
<mysql.version>5.1.25</mysql.version>
|
||||||
<slf4j.version>1.6.1</slf4j.version>
|
<slf4j.version>1.6.1</slf4j.version>
|
||||||
<jboss.version>7.1.1.Final</jboss.version>
|
<jboss.version>7.1.1.Final</jboss.version>
|
||||||
<wildfly.version>8.0.0.Beta1</wildfly.version>
|
<wildfly.version>8.0.0.CR1</wildfly.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<url>http://keycloak.org</url>
|
<url>http://keycloak.org</url>
|
||||||
|
@ -86,8 +86,6 @@
|
||||||
<module>examples</module>
|
<module>examples</module>
|
||||||
<module>testsuite</module>
|
<module>testsuite</module>
|
||||||
<module>server</module>
|
<module>server</module>
|
||||||
<module>dist</module>
|
|
||||||
<module>dist-as7</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
|
@ -328,11 +326,11 @@
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>${mysql.version}</version>
|
<version>${mysql.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- the dependency seems to override Resteasy 3.0.5's dependeing on 4.2.1
|
<!-- the dependency seems to override Resteasy 3.0.5's depending on 4.2.1
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>${apache.httpcomponents.version}</version>
|
<version>${keycloak.apache.httpcomponents.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
-->
|
-->
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
115
server/pom.xml
115
server/pom.xml
|
@ -16,20 +16,19 @@
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>keycloak-admin-ui</artifactId>
|
<artifactId>bcprov-jdk16</artifactId>
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-admin-ui-styles</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<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-core-jaxrs</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-services</artifactId>
|
<artifactId>keycloak-services</artifactId>
|
||||||
|
@ -54,24 +53,6 @@
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-social-google</artifactId>
|
<artifactId>keycloak-social-google</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpclient</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>commons-logging</groupId>
|
|
||||||
<artifactId>commons-logging</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>commons-codec</groupId>
|
|
||||||
<artifactId>commons-codec</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
|
||||||
<artifactId>jackson-core-asl</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
|
@ -89,49 +70,75 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>jaxrs-api</artifactId>
|
<artifactId>keycloak-admin-ui</artifactId>
|
||||||
<scope>provided</scope>
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-admin-ui-styles</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.1</version>
|
||||||
|
<scope>test</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>
|
<!-- resteasy -->
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
|
||||||
<artifactId>jackson-core-asl</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.codehaus.jackson</groupId>
|
|
||||||
<artifactId>jackson-mapper-asl</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
<artifactId>resteasy-jaxrs</artifactId>
|
<artifactId>resteasy-jaxrs</artifactId>
|
||||||
<scope>provided</scope>
|
<version>${resteasy.version}</version>
|
||||||
<exclusions>
|
</dependency>
|
||||||
<exclusion>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>resteasy-multipart-provider</artifactId>
|
||||||
</exclusion>
|
<version>${resteasy.version}</version>
|
||||||
<exclusion>
|
</dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<dependency>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
</exclusion>
|
<artifactId>resteasy-client</artifactId>
|
||||||
<exclusion>
|
<version>${resteasy.version}</version>
|
||||||
<groupId>org.slf4j</groupId>
|
</dependency>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<dependency>
|
||||||
</exclusion>
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
</exclusions>
|
<artifactId>async-http-servlet-3.0</artifactId>
|
||||||
|
<version>${resteasy.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
|
<artifactId>jaxrs-api</artifactId>
|
||||||
|
<version>${resteasy.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
|
<artifactId>resteasy-jackson-provider</artifactId>
|
||||||
|
<version>${resteasy.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>auth-server</finalName>
|
<finalName>auth-server</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jboss.as.plugins</groupId>
|
||||||
|
<artifactId>jboss-as-maven-plugin</artifactId>
|
||||||
|
<version>7.5.Final</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<jboss-deployment-structure>
|
|
||||||
<deployment>
|
|
||||||
<dependencies>
|
|
||||||
<module name="org.apache.httpcomponents"/>
|
|
||||||
<module name="org.codehaus.jackson.jackson-core-asl"/>
|
|
||||||
</dependencies>
|
|
||||||
</deployment>
|
|
||||||
</jboss-deployment-structure>
|
|
|
@ -1,27 +1,27 @@
|
||||||
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
||||||
<jta-data-source>java:jboss/datasources/KeycloakDS</jta-data-source>
|
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationScopeMappingEntity</class>
|
<class>org.keycloak.models.jpa.entities.ApplicationScopeMappingEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationUserRoleMappingEntity</class>
|
<class>org.keycloak.models.jpa.entities.ApplicationUserRoleMappingEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RealmScopeMappingEntity</class>
|
<class>org.keycloak.models.jpa.entities.RealmScopeMappingEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RealmUserRoleMappingEntity</class>
|
<class>org.keycloak.models.jpa.entities.RealmUserRoleMappingEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RoleEntity</class>
|
<class>org.keycloak.models.jpa.entities.RoleEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
||||||
|
|
||||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<property name="hibernate.hbm2ddl.auto" value="update" />
|
<property name="hibernate.hbm2ddl.auto" value="update" />
|
||||||
</properties>
|
</properties>
|
||||||
</persistence-unit>
|
</persistence-unit>
|
||||||
</persistence>
|
</persistence>
|
||||||
|
|
|
@ -1,10 +1,21 @@
|
||||||
<jboss-deployment-structure>
|
<jboss-deployment-structure>
|
||||||
<deployment>
|
<deployment>
|
||||||
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
|
<exclusions>
|
||||||
<dependencies>
|
|
||||||
<module name="org.jboss.resteasy.jose-jwt"/>
|
<!-- Exclude Version cxf of JBOSS -->
|
||||||
<module name="org.jboss.resteasy.resteasy-crypto"/>
|
<module name="org.apache.cxf" />
|
||||||
<module name="org.bouncycastle"/>
|
<!-- Exclude JAVA EE of JBOSS (javax.ws..) => Add dependency javax.annotation -->
|
||||||
</dependencies>
|
<module name="javaee.api" />
|
||||||
|
<!-- Exclude RestEasy conflict (javax.ws.rs.ext.RunDelegate) -->
|
||||||
|
<module name="org.jboss.resteasy.resteasy-atom-provider" />
|
||||||
|
<module name="org.jboss.resteasy.resteasy-cdi" />
|
||||||
|
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
|
||||||
|
<module name="org.jboss.resteasy.resteasy-jaxb-provider" />
|
||||||
|
<module name="org.jboss.resteasy.resteasy-jaxrs" />
|
||||||
|
<module name="org.jboss.resteasy.resteasy-jettison-provider" />
|
||||||
|
<module name="org.jboss.resteasy.resteasy-jsapi" />
|
||||||
|
<module name="org.jboss.resteasy.resteasy-multipart-provider" />
|
||||||
|
<module name="org.jboss.resteasy.resteasy-yaml-provider" />
|
||||||
|
</exclusions>
|
||||||
</deployment>
|
</deployment>
|
||||||
</jboss-deployment-structure>
|
</jboss-deployment-structure>
|
|
@ -44,4 +44,17 @@
|
||||||
<url-pattern>/rest/*</url-pattern>
|
<url-pattern>/rest/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
<security-constraint>
|
||||||
|
<web-resource-collection>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</web-resource-collection>
|
||||||
|
<user-data-constraint>
|
||||||
|
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
|
||||||
|
</user-data-constraint>
|
||||||
|
</security-constraint>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
</web-app>
|
</web-app>
|
||||||
|
|
Loading…
Reference in a new issue