Skip to content

Commit 2029dde

Browse files
committed
pac4j starter module
1 parent c8f095c commit 2029dde

File tree

13 files changed

+654
-6
lines changed

13 files changed

+654
-6
lines changed

etc/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
DIR=$(cd "$(dirname "$0")"; pwd)
44

5-
sh $DIR/maven.sh -pl '!docs,!tests,!examples' clean deploy -P bom,central
5+
sh $DIR/maven.sh -pl '!docs,!tests,!examples,!starters' clean deploy -P bom,central

modules/jooby-bom/pom.xml

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
<!-- THIS FILE IS AUTO GENERATED. DON'T EDIT -->
1717

1818
<properties>
19-
<jooby.version>2.3.1</jooby.version>
19+
<jooby.version>2.3.2-SNAPSHOT</jooby.version>
2020
<HikariCP.version>3.4.1</HikariCP.version>
2121
<archetype-packaging.version>3.1.2</archetype-packaging.version>
2222
<asm.version>7.2</asm.version>
2323
<auto-service.version>1.0-rc6</auto-service.version>
2424
<boringssl.version>2.0.27.Final</boringssl.version>
25-
<checkstyle.version>8.19</checkstyle.version>
25+
<checkstyle.version>8.27</checkstyle.version>
2626
<commons-io.version>2.6</commons-io.version>
2727
<compile-testing.version>0.18</compile-testing.version>
2828
<config.version>1.4.0</config.version>
@@ -47,8 +47,8 @@
4747
<jdbi.version>3.11.1</jdbi.version>
4848
<jetty.version>9.4.24.v20191120</jetty.version>
4949
<jfiglet.version>0.0.8</jfiglet.version>
50-
<jooby-maven-plugin.version>2.3.1</jooby-maven-plugin.version>
51-
<jooby.version>2.3.1</jooby.version>
50+
<jooby-maven-plugin.version>2.3.2-SNAPSHOT</jooby-maven-plugin.version>
51+
<jooby.version>2.3.2-SNAPSHOT</jooby.version>
5252
<json.version>20190722</json.version>
5353
<jsonwebtoken.version>0.10.7</jsonwebtoken.version>
5454
<jsr305.version>3.0.2</jsr305.version>
@@ -66,7 +66,7 @@
6666
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
6767
<maven-core.version>3.6.3</maven-core.version>
6868
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
69-
<maven-enforcer-plugin.version>3.0.0-M1</maven-enforcer-plugin.version>
69+
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
7070
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
7171
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
7272
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
@@ -85,6 +85,7 @@
8585
<netty.version>4.1.43.Final</netty.version>
8686
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
8787
<okhttp.version>4.2.2</okhttp.version>
88+
<pac4j.version>4.0.0-RC2</pac4j.version>
8889
<pebble.version>3.1.1</pebble.version>
8990
<plexus-utils.version>3.3.0</plexus-utils.version>
9091
<reactor.version>3.3.1.RELEASE</reactor.version>
@@ -188,6 +189,11 @@
188189
<artifactId>jooby-weld</artifactId>
189190
<version>${jooby.version}</version>
190191
</dependency>
192+
<dependency>
193+
<groupId>io.jooby</groupId>
194+
<artifactId>jooby-pac4j</artifactId>
195+
<version>${jooby.version}</version>
196+
</dependency>
191197
<dependency>
192198
<groupId>io.jooby</groupId>
193199
<artifactId>jooby-guice</artifactId>
@@ -563,6 +569,56 @@
563569
<artifactId>guava</artifactId>
564570
<version>${guava.version}</version>
565571
</dependency>
572+
<dependency>
573+
<groupId>org.pac4j</groupId>
574+
<artifactId>pac4j-core</artifactId>
575+
<version>${pac4j.version}</version>
576+
</dependency>
577+
<dependency>
578+
<groupId>org.pac4j</groupId>
579+
<artifactId>pac4j-http</artifactId>
580+
<version>${pac4j.version}</version>
581+
</dependency>
582+
<dependency>
583+
<groupId>org.pac4j</groupId>
584+
<artifactId>pac4j-cas</artifactId>
585+
<version>${pac4j.version}</version>
586+
</dependency>
587+
<dependency>
588+
<groupId>org.pac4j</groupId>
589+
<artifactId>pac4j-config</artifactId>
590+
<version>${pac4j.version}</version>
591+
</dependency>
592+
<dependency>
593+
<groupId>org.pac4j</groupId>
594+
<artifactId>pac4j-jwt</artifactId>
595+
<version>${pac4j.version}</version>
596+
</dependency>
597+
<dependency>
598+
<groupId>org.pac4j</groupId>
599+
<artifactId>pac4j-oauth</artifactId>
600+
<version>${pac4j.version}</version>
601+
</dependency>
602+
<dependency>
603+
<groupId>org.pac4j</groupId>
604+
<artifactId>pac4j-oidc</artifactId>
605+
<version>${pac4j.version}</version>
606+
</dependency>
607+
<dependency>
608+
<groupId>org.pac4j</groupId>
609+
<artifactId>pac4j-openid</artifactId>
610+
<version>${pac4j.version}</version>
611+
</dependency>
612+
<dependency>
613+
<groupId>org.pac4j</groupId>
614+
<artifactId>pac4j-saml</artifactId>
615+
<version>${pac4j.version}</version>
616+
</dependency>
617+
<dependency>
618+
<groupId>org.pac4j</groupId>
619+
<artifactId>pac4j-ldap</artifactId>
620+
<version>${pac4j.version}</version>
621+
</dependency>
566622
<dependency>
567623
<groupId>org.codehaus.mojo</groupId>
568624
<artifactId>exec-maven-plugin</artifactId>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
<module>modules</module>
148148
<module>tests</module>
149149
<module>examples</module>
150+
<module>starters</module>
150151
<module>docs</module>
151152
</modules>
152153

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
###################################################################################################
2+
# Facebook
3+
###################################################################################################
4+
fb.key = 145278422258960
5+
fb.secret = be21409ba8f39b5dae2a7de525484da8
6+
7+
###################################################################################################
8+
# Twitter
9+
###################################################################################################
10+
twitter.key = CoxUiYwQOSFDReZYdjigBA
11+
twitter.secret = 2kAzunH5Btc4gRSaMr7D7MkyoJ5u1VzbOOzE8rBofs
12+
13+
###################################################################################################
14+
# OIDC
15+
###################################################################################################
16+
oidc.clientId = 343992089165-sp0l1km383i8cbm2j5nn20kbk5dk8hor.apps.googleusercontent.com
17+
oidc.secret = uR3D8ej1kIRPbqAFaxIE3HWh
18+
oidc.discoveryURI = "https://accounts.google.com/.well-known/openid-configuration"
19+
20+
###################################################################################################
21+
# JWT Salt
22+
###################################################################################################
23+
jwt.salt = 12345678901234567890123456789012
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration scan="true" scanPeriod="15 seconds" debug="false">
3+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
4+
<encoder>
5+
<pattern>[%d{ISO8601}]-[%thread] %-5level %logger - %msg%n</pattern>
6+
</encoder>
7+
</appender>
8+
9+
<root level="INFO">
10+
<appender-ref ref="STDOUT" />
11+
</root>
12+
</configuration>

starters/pac4j-starter/pom.xml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
6+
<modelVersion>4.0.0</modelVersion>
7+
8+
<artifactId>pac4j-starter</artifactId>
9+
<groupId>app</groupId>
10+
<version>1.0.0</version>
11+
12+
<properties>
13+
<!-- Startup class -->
14+
<application.class>app.App</application.class>
15+
16+
<jooby.version>2.3.2-SNAPSHOT</jooby.version>
17+
18+
<maven.compiler.source>1.8</maven.compiler.source>
19+
<maven.compiler.target>1.8</maven.compiler.target>
20+
<maven.compiler.parameters>true</maven.compiler.parameters>
21+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22+
</properties>
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>io.jooby</groupId>
27+
<artifactId>jooby-netty</artifactId>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>io.jooby</groupId>
32+
<artifactId>jooby-pac4j</artifactId>
33+
</dependency>
34+
35+
<dependency>
36+
<groupId>ch.qos.logback</groupId>
37+
<artifactId>logback-classic</artifactId>
38+
</dependency>
39+
40+
<!-- Tests -->
41+
<dependency>
42+
<groupId>org.junit.jupiter</groupId>
43+
<artifactId>junit-jupiter-api</artifactId>
44+
<scope>test</scope>
45+
</dependency>
46+
47+
<dependency>
48+
<groupId>org.junit.jupiter</groupId>
49+
<artifactId>junit-jupiter-engine</artifactId>
50+
<scope>test</scope>
51+
</dependency>
52+
53+
<dependency>
54+
<groupId>io.jooby</groupId>
55+
<artifactId>jooby-test</artifactId>
56+
<scope>test</scope>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>com.squareup.okhttp3</groupId>
61+
<artifactId>okhttp</artifactId>
62+
<scope>test</scope>
63+
</dependency>
64+
65+
</dependencies>
66+
67+
<build>
68+
<plugins>
69+
<plugin>
70+
<artifactId>maven-compiler-plugin</artifactId>
71+
<version>3.6.2</version>
72+
</plugin>
73+
<plugin>
74+
<artifactId>maven-surefire-plugin</artifactId>
75+
<version>2.22.2</version>
76+
</plugin>
77+
<!-- jooby:run -->
78+
<plugin>
79+
<groupId>io.jooby</groupId>
80+
<artifactId>jooby-maven-plugin</artifactId>
81+
<version>${jooby.version}</version>
82+
</plugin>
83+
<!-- Build uber jar -->
84+
<plugin>
85+
<artifactId>maven-shade-plugin</artifactId>
86+
<version>3.2.1</version>
87+
<executions>
88+
<execution>
89+
<id>uber-jar</id>
90+
<phase>package</phase>
91+
<goals>
92+
<goal>shade</goal>
93+
</goals>
94+
<configuration>
95+
<createDependencyReducedPom>false</createDependencyReducedPom>
96+
<transformers>
97+
<transformer
98+
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
99+
<transformer
100+
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
101+
<mainClass>${application.class}</mainClass>
102+
</transformer>
103+
</transformers>
104+
</configuration>
105+
</execution>
106+
</executions>
107+
</plugin>
108+
</plugins>
109+
</build>
110+
111+
<dependencyManagement>
112+
<dependencies>
113+
<dependency>
114+
<groupId>io.jooby</groupId>
115+
<artifactId>jooby-bom</artifactId>
116+
<version>${jooby.version}</version>
117+
<type>pom</type>
118+
<scope>import</scope>
119+
</dependency>
120+
</dependencies>
121+
</dependencyManagement>
122+
</project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package starter;
2+
3+
import io.jooby.Jooby;
4+
5+
public class App extends Jooby {
6+
{
7+
8+
}
9+
10+
public static void main(String[] args) {
11+
runApp(args, Jooby::new);
12+
}
13+
}

0 commit comments

Comments
 (0)