updated libraries
This commit is contained in:
@ -31,22 +31,8 @@ limitations under the License.
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.inversoft</groupId>
|
||||
<artifactId>prime-jwt</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>io.fusionauth</groupId>
|
||||
<artifactId>fusionauth-jwt</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
|
||||
@ -15,19 +15,17 @@
|
||||
*/
|
||||
package de.muehlencord.shared.jeeutil.jwt;
|
||||
|
||||
import io.fusionauth.jwt.Verifier;
|
||||
import io.fusionauth.jwt.domain.JWT;
|
||||
import io.fusionauth.jwt.hmac.HMACVerifier;
|
||||
import java.time.ZonedDateTime;
|
||||
import org.primeframework.jwt.Verifier;
|
||||
import org.primeframework.jwt.domain.JWT;
|
||||
import org.primeframework.jwt.domain.JWTException;
|
||||
import org.primeframework.jwt.hmac.HMACVerifier;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Joern Muehlencord (joern@muehlencord.de)
|
||||
*/
|
||||
public class JWTDecoder {
|
||||
|
||||
private boolean parsedSuccessfully = false;
|
||||
private boolean parsedSuccessfully;
|
||||
private JWT jwt = null;
|
||||
|
||||
public JWTDecoder(String password, String issuer, String jwtString) throws JWTException {
|
||||
@ -35,13 +33,8 @@ public class JWTDecoder {
|
||||
throw new JWTException("password, issuer and jwt must not be null");
|
||||
}
|
||||
Verifier verifier = HMACVerifier.newVerifier(password);
|
||||
// Verifier verifier = RSAVerifier.newVerifier(new String(Files.readAllBytes(Paths.get("public_key.pem"))));
|
||||
try {
|
||||
jwt = JWT.getDecoder().decode(jwtString, verifier);
|
||||
parsedSuccessfully = jwt.issuer.equals(issuer);
|
||||
} catch (JWTException ex) {
|
||||
jwt = null;
|
||||
}
|
||||
parsedSuccessfully = jwt != null && jwt.issuer.equals(issuer);
|
||||
}
|
||||
|
||||
public String getIssuer() {
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
*/
|
||||
package de.muehlencord.shared.jeeutil.jwt;
|
||||
|
||||
import io.fusionauth.jwt.Signer;
|
||||
import io.fusionauth.jwt.domain.JWT;
|
||||
import io.fusionauth.jwt.hmac.HMACSigner;
|
||||
import java.time.ZonedDateTime;
|
||||
import org.primeframework.jwt.Signer;
|
||||
import org.primeframework.jwt.domain.JWT;
|
||||
import org.primeframework.jwt.hmac.HMACSigner;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -255,8 +255,28 @@ public abstract class PoiUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static int getIntegerValue(Row currentRow, int cellNumber) throws PoiException {
|
||||
return getIntegerValue(currentRow, cellNumber, false, 0);
|
||||
}
|
||||
|
||||
public static Integer getIntegerValue(Row currentRow, int cellNumber, boolean returnDefaultValue, Integer defaultValue) throws PoiException {
|
||||
if (currentRow == null) {
|
||||
throw new PoiException("Current row must not be null");
|
||||
}
|
||||
Cell cell = currentRow.getCell(cellNumber);
|
||||
if ((PoiUtil.cellEmpty(cell)) && !returnDefaultValue) {
|
||||
throw new PoiException("Cannot read cell " + cellNumber + " from row " + currentRow.getRowNum());
|
||||
} else {
|
||||
if (PoiUtil.cellEmpty(cell)) {
|
||||
return defaultValue;
|
||||
} else {
|
||||
return Double.valueOf(cell.getNumericCellValue()).intValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* remove charecters which often cause troubles in other applications - e.g. em dash (long dash) is created by Excel automatically
|
||||
* remove characters which often cause troubles in other applications - e.g. em dash (long dash) is created by Excel automatically
|
||||
*
|
||||
* @param sourceValue the input string to execute the replacement
|
||||
* @return sourceValue with replaced characters
|
||||
|
||||
51
pom.xml
51
pom.xml
@ -104,7 +104,7 @@ limitations under the License.
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.13</version>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
@ -114,27 +114,27 @@ limitations under the License.
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.9</version>
|
||||
<version>3.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.6</version>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.28</version>
|
||||
<version>1.7.30</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.28</version>
|
||||
<version>1.7.30</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>1.7.28</version>
|
||||
<version>1.7.30</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -150,44 +150,44 @@ limitations under the License.
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.5</version>
|
||||
<version>2.8.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>2.11.2</version>
|
||||
<version>2.11.3</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.11.2</version>
|
||||
<version>2.11.3</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>2.11.2</version>
|
||||
<version>2.11.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-web</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-api</artifactId>
|
||||
<version>7.0</version>
|
||||
<version>8.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-web-api</artifactId>
|
||||
<version>7.0</version>
|
||||
<version>8.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -198,40 +198,39 @@ limitations under the License.
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.62</version>
|
||||
<version>1.68</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>5.3.10.Final</version>
|
||||
<version>5.4.23.Final</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.primefaces</groupId>
|
||||
<artifactId>primefaces</artifactId>
|
||||
<version>7.0</version>
|
||||
<version>8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.adminfaces</groupId>
|
||||
<artifactId>admin-template</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.omnifaces</groupId>
|
||||
<artifactId>omnifaces</artifactId>
|
||||
<version>3.3</version>
|
||||
<version>3.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<!-- do not upgrade to 4.1.0, see bug https://bz.apache.org/bugzilla/show_bug.cgi?id=63845 -->
|
||||
<version>5.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.inversoft</groupId>
|
||||
<artifactId>prime-jwt</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<groupId>io.fusionauth</groupId>
|
||||
<artifactId>fusionauth-jwt</artifactId>
|
||||
<version>4.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Dev Tools -->
|
||||
@ -239,14 +238,14 @@ limitations under the License.
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>1.18.12</version>
|
||||
<version>1.18.16</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Testing -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>5.5.1</version>
|
||||
<version>5.7.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
Reference in New Issue
Block a user