Skip to content

Commit

Permalink
Bump versions, update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaLisov committed Apr 15, 2024
1 parent 4bc4dce commit bf58f31
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,25 @@ public class Main {

```

### Get claim from JWT token

To get claim by its name from JWT token payload call method `claim(String token, String key)`
on `TokenService`
object.

```java
public class Main {
public static void main(String[] args) {
String token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c";

String claim = (String) tokenService.claim(token, "subject");

System.out.println(claim);
}
}

```

## How to contribute

See active issues at [issues page](https://github.com/ilyalisov/jwt/issues)
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jjwt.version>0.12.2</jjwt.version>
<jjwt.version>0.12.5</jjwt.version>
<lombok.version>1.18.30</lombok.version>
<jedis.version>5.1.0</jedis.version>
<checkstyle.version>3.2.2</checkstyle.version>
<junit.version>5.10.1</junit.version>
<testcontainers.version>1.19.3</testcontainers.version>
<checkstyle.version>3.3.1</checkstyle.version>
<junit.version>5.10.2</junit.version>
<testcontainers.version>1.19.7</testcontainers.version>
<jacoco.version>0.8.11</jacoco.version>
</properties>
<dependencies>
Expand Down Expand Up @@ -205,7 +205,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down

0 comments on commit bf58f31

Please sign in to comment.