Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
remove unnecessary dependencies, fix the bug that got the header of t…
Browse files Browse the repository at this point in the history
…oken instead of the payload
  • Loading branch information
Parisa68 committed Feb 15, 2024
1 parent 429eaae commit b5462f1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,6 @@
<artifactId>clearinghouse</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.12.3</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.12.3</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.12.3</version>
</dependency>
<dependency>
<groupId>no.uio.ifi</groupId>
<artifactId>tsd-file-api-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/no/elixir/fega/ltp/aspects/AAIAspect.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public Object authenticateElixirAAI(ProceedingJoinPoint joinPoint) throws Throwa
String jwtToken = optionalBearerAuth.get().replace("Bearer ", "");
try {
var tokenArray = jwtToken.split("[.]");
byte[] decodedHeader = Base64.getUrlDecoder().decode(tokenArray[0]);
byte[] decodedHeader = Base64.getUrlDecoder().decode(tokenArray[1]);
String decodedHeaderString = new String(decodedHeader);
Gson gson = new Gson();
JsonObject claims = gson.fromJson(decodedHeaderString, JsonObject.class);
Expand Down

0 comments on commit b5462f1

Please sign in to comment.