Skip to content

Commit

Permalink
move jwt dependency from console,core to auth. (alibaba#3624)
Browse files Browse the repository at this point in the history
  • Loading branch information
horizonzy authored Aug 18, 2020
1 parent 1e5a597 commit e7c269a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 30 deletions.
15 changes: 15 additions & 0 deletions auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.alibaba.nacos.auth.common.env.ReloadableConfigs;
import com.alibaba.nacos.common.JustForTest;
import io.jsonwebtoken.io.Decoders;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -67,7 +68,7 @@ public class AuthConfigs {

public byte[] getSecretKeyBytes() {
if (secretKeyBytes == null) {
secretKeyBytes = secretKey.getBytes();
secretKeyBytes = Decoders.BASE64.decode(secretKey);
}
return secretKeyBytes;
}
Expand Down
14 changes: 0 additions & 14 deletions console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
Expand Down
15 changes: 0 additions & 15 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,6 @@
<artifactId>commons-collections</artifactId>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
Expand Down

0 comments on commit e7c269a

Please sign in to comment.