-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In charge of validation of Json Web Tokens signature & expiration Closes gravitee-io/issues#46
- Loading branch information
Showing
15 changed files
with
1,200 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# JWT Gravitee Policy | ||
|
||
Here you can document your JWT Gravitee Policy. | ||
|
||
Current policy use distributed cache (hazelcast) | ||
To run the policy you need to start cache before starting the gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
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. | ||
--> | ||
<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> | ||
|
||
<groupId>io.gravitee.policy</groupId> | ||
<artifactId>gravitee-policy-jwt</artifactId> | ||
<version>1.0.1-SNAPSHOT</version> | ||
|
||
<name>JWT Gravitee Policy</name> | ||
<description>Description of the JWT Gravitee Policy</description> | ||
|
||
<parent> | ||
<groupId>io.gravitee</groupId> | ||
<artifactId>gravitee-parent</artifactId> | ||
<version>5</version> | ||
</parent> | ||
|
||
<properties> | ||
<gravitee-gateway-api.version>0.12.0</gravitee-gateway-api.version> | ||
<gravitee-policy-api.version>0.9.0</gravitee-policy-api.version> | ||
<gravitee-common.version>0.10.0</gravitee-common.version> | ||
<gravitee-resource-api.version>0.1.0</gravitee-resource-api.version> | ||
<gravitee-repository.version>0.15.0-SNAPSHOT</gravitee-repository.version> | ||
<junit.version>4.12</junit.version> | ||
<jjwt.version>0.6.0</jjwt.version> | ||
|
||
<json-schema-generator-maven-plugin.version>1.1.0</json-schema-generator-maven-plugin.version> | ||
<json-schema-generator-maven-plugin.outputDirectory>${project.build.directory}/schemas</json-schema-generator-maven-plugin.outputDirectory> | ||
|
||
<maven-assembly-plugin.version>2.5.5</maven-assembly-plugin.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- Provided scope --> | ||
<dependency> | ||
<groupId>io.gravitee.gateway</groupId> | ||
<artifactId>gravitee-gateway-api</artifactId> | ||
<version>${gravitee-gateway-api.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.gravitee.policy</groupId> | ||
<artifactId>gravitee-policy-api</artifactId> | ||
<version>${gravitee-policy-api.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.gravitee.common</groupId> | ||
<artifactId>gravitee-common</artifactId> | ||
<version>${gravitee-common.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.gravitee.resource</groupId> | ||
<artifactId>gravitee-resource-api</artifactId> | ||
<version>${gravitee-resource-api.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.gravitee.repository</groupId> | ||
<artifactId>gravitee-repository</artifactId> | ||
<version>${gravitee-repository.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.jsonwebtoken</groupId> | ||
<artifactId>jjwt</artifactId> | ||
<version>${jjwt.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-core</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>1.1.7</version> | ||
</dependency> | ||
|
||
<!-- Test scope --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<version>${mockito.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>${maven-assembly-plugin.version}</version> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>src/assembly/policy-assembly.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-policy-assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!-- | ||
Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
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. | ||
--> | ||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> | ||
<id>policy</id> | ||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
|
||
<!-- Include the main Policy Jar file --> | ||
<files> | ||
<file> | ||
<source>${project.build.directory}/${project.build.finalName}.jar</source> | ||
</file> | ||
</files> | ||
|
||
<fileSets> | ||
<!-- Then include Policy configuration schemas --> | ||
<fileSet> | ||
<directory>src/main/resources/schemas</directory> | ||
<outputDirectory>schemas</outputDirectory> | ||
</fileSet> | ||
|
||
<!-- Create the empty lib directory in case of no libraries is required --> | ||
<!-- As there is no maven-assembly-plugin's method do to that, we hack it ourself --> | ||
<fileSet> | ||
<directory>${project.basedir}/src/assembly</directory> | ||
<outputDirectory>lib</outputDirectory> | ||
<excludes> | ||
<exclude>*</exclude> | ||
</excludes> | ||
</fileSet> | ||
</fileSets> | ||
|
||
<!-- Finally include Policy dependencies --> | ||
<dependencySets> | ||
<dependencySet> | ||
<outputDirectory>lib</outputDirectory> | ||
<useProjectArtifact>false</useProjectArtifact> | ||
</dependencySet> | ||
</dependencySets> | ||
</assembly> |
Oops, something went wrong.