Skip to content

Commit

Permalink
add test case to generate longlived token for tokenization
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehu committed Mar 23, 2018
1 parent 0264da9 commit 915675b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions security/src/test/java/com/networknt/security/JwtIssuerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,20 @@ public void longlivedTransferJwt() throws Exception {
System.out.println("***Long lived token for etransfer***: " + jwt);
}

@Test
public void longlivedTokenizationJwt() throws Exception {
JwtClaims claims = ClaimsUtil.getTestClaims("steve", "EMPLOYEE", "f7d42348-c647-4efb-a52d-4c5787421e72", Arrays.asList("token.r", "token.w", "scheme.r"));
claims.setExpirationTimeMinutesInTheFuture(5256000);
String jwt = JwtIssuer.getJwt(claims);
System.out.println("***Long lived token for tokenizaiton***: " + jwt);
}

@Test
public void longlivedTokenizationJwt73() throws Exception {
JwtClaims claims = ClaimsUtil.getTestClaims("steve", "EMPLOYEE", "f7d42348-c647-4efb-a52d-4c5787421e73", Arrays.asList("token.r", "token.w"));
claims.setExpirationTimeMinutesInTheFuture(5256000);
String jwt = JwtIssuer.getJwt(claims);
System.out.println("***Long lived token for tokenizaiton***: " + jwt);
}

}

0 comments on commit 915675b

Please sign in to comment.