File tree Expand file tree Collapse file tree
src/main/java/io/github/isagroup Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88 <groupId >io.github.isa-group</groupId >
99 <artifactId >Pricing4Java</artifactId >
10- <version >4.0.0 </version >
10+ <version >4.0.1 </version >
1111
1212 <name >${project.groupId} :${project.artifactId} </name >
1313 <description >A pricing driven feature toggling library for java</description >
Original file line number Diff line number Diff line change @@ -30,11 +30,19 @@ public abstract class PricingContext {
3030 public abstract String getConfigFilePath ();
3131
3232 /**
33- * Returns the secret used to encode the JWT.
33+ * Returns the secret used to encode the pricing JWT.
3434 * * @return JWT secret String
3535 */
3636 public abstract String getJwtSecret ();
3737
38+ /**
39+ * Returns the secret used to encode the authorization JWT.
40+ * * @return JWT secret String
41+ */
42+ public String getAuthJwtSecret (){
43+ return this .getJwtSecret ();
44+ }
45+
3846 /**
3947 * Returns the expiration time of the JWT in milliseconds
4048 *
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ public String getUserNameFromJwtToken(String token) {
121121 */
122122 public boolean validateJwtToken (String authToken ) {
123123 try {
124- Jwts .parser ().setSigningKey (pricingContext .getJwtSecret ()).parseClaimsJws (authToken );
124+ Jwts .parser ().setSigningKey (pricingContext .getAuthJwtSecret ()).parseClaimsJws (authToken );
125125 return true ;
126126 } catch (SignatureException e ) {
127127 logger .error ("Invalid JWT signature: {}" , e .getMessage ());
You can’t perform that action at this time.
0 commit comments