Skip to content

Commit

Permalink
chore(deps): update dependency io.jsonwebtoken:jjwt to v0.12.2 (#765)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency io.jsonwebtoken:jjwt to v0.12.2

* fix: update git-changelog-maven-plugin version
  • Loading branch information
damingerdai authored Oct 14, 2023
1 parent 4b23b85 commit 4f53f13
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ maven_install(
"org.postgresql:postgresql:42.6.0",

"org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0",
"io.jsonwebtoken:jjwt-api:0.11.5",
"io.jsonwebtoken:jjwt-impl:0.11.5",
"io.jsonwebtoken:jjwt-jackson:0.11.5",
"io.jsonwebtoken:jjwt-api:0.12.2",
"io.jsonwebtoken:jjwt-impl:0.12.2",
"io.jsonwebtoken:jjwt-jackson:0.12.2",
"commons-codec:commons-codec:1.16.0",
"org.apache.commons:commons-lang3:3.13.0",
"jakarta.xml.bind:jakarta.xml.bind-api:4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ dependencies {

implementation 'org.postgresql:postgresql:42.6.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
implementation 'io.jsonwebtoken:jjwt-api:0.12.2'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.2'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.2'
implementation 'commons-codec:commons-codec:1.16.0'
implementation 'org.apache.commons:commons-lang3:3.13.0'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
Expand Down
13 changes: 7 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
<kotlin.version>1.3.70</kotlin.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<changelog.version>1.100.2-SNAPSHOT</changelog.version>
<changelog.version>1.100.6</changelog.version>
<jsonwebtoken.version>0.12.2</jsonwebtoken.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -77,18 +78,18 @@
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.5</version>
<version>${jsonwebtoken.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.5</version>
<version>${jsonwebtoken.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId> <!-- or jjwt-gson if Gson is preferred -->
<version>0.11.5</version>
<version>${jsonwebtoken.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -207,8 +208,8 @@
<configuration>
<useIntegrations>true</useIntegrations>
<gitHubEnabled>trye</gitHubEnabled>
<gitHubApi>https://api.github.com/repos/tomasbjerre/git-changelog-maven-plugin</gitHubApi>
<gitHubToken>${GITHUB_OAUTH2TOKEN}</gitHubToken><!-- Optional // -->
<gitHubApi>https://api.github.com/repos/damingerdai/hoteler</gitHubApi>
<!-- <gitHubToken>${GITHUB_OAUTH2TOKEN}</gitHubToken>&lt;!&ndash; Optional // &ndash;&gt;-->
<gitHubIssuePattern>#([0-9]*)</gitHubIssuePattern>
<templateFile>changelog.mustache</templateFile>
<readableTagName>-([^-]+?)$</readableTagName>
Expand Down
2 changes: 1 addition & 1 deletion src/main/angular
Submodule angular updated 83 files
+4 −3 .github/workflows/ci.yml
+1 −1 .nvmrc
+2 −2 Dockerfile
+5 −0 _nginx/default.conf
+5 −0 _nginx/default.template
+98 −2 angular.json
+30 −0 ngsw-config.json
+53 −47 package.json
+2 −0 scripts/build-docker.ps1
+8 −0 src/_app-theme.scss
+17 −17 src/app/app-routing.module.ts
+8 −1 src/app/app.component.spec.ts
+10 −2 src/app/app.component.ts
+12 −3 src/app/app.module.ts
+11 −1 src/app/core/api/api.service.ts
+16 −0 src/app/core/bootstrap/fontfaceobserver.service.spec.ts
+36 −0 src/app/core/bootstrap/fontfaceobserver.service.ts
+1 −2 src/app/core/core.module.ts
+5 −5 src/app/core/guards/auth.guard.spec.ts
+11 −33 src/app/core/guards/auth.guard.ts
+15 −0 src/app/core/initializers.ts
+1 −0 src/app/core/models/index.ts
+14 −0 src/app/core/models/permission.ts
+2 −0 src/app/core/models/user.ts
+2 −0 src/app/core/pipes/index.ts
+8 −0 src/app/core/pipes/user-role-display.pipe.spec.ts
+14 −0 src/app/core/pipes/user-role-display.pipe.ts
+48 −0 src/app/core/pwa/check-for-update.service.spec.ts
+123 −0 src/app/core/pwa/check-for-update.service.ts
+24 −5 src/app/core/services/settings/settings.service.ts
+10 −3 src/app/core/services/user/user.service.ts
+15 −0 src/app/layout/admin-layout/_admin-layout-theme.scss
+24 −39 src/app/layout/admin-layout/admin-layout.component.html
+0 −3 src/app/layout/admin-layout/admin-layout.component.scss
+0 −10 src/app/layout/admin-layout/admin-layout.component.ts
+0 −52 src/app/routes/admin/admin-routing.module.ts
+0 −32 src/app/routes/admin/admin.component.html
+0 −17 src/app/routes/admin/admin.component.scss
+0 −27 src/app/routes/admin/admin.component.spec.ts
+0 −38 src/app/routes/admin/admin.component.ts
+0 −21 src/app/routes/admin/admin.module.ts
+24 −0 src/app/routes/customer/customer-list/_customer-list-theme.scss
+56 −50 src/app/routes/customer/customer-list/customer-list.component.html
+20 −22 src/app/routes/customer/customer-list/customer-list.component.scss
+27 −0 src/app/routes/login/_login-theme.scss
+4 −2 src/app/routes/login/login.component.html
+10 −14 src/app/routes/login/login.component.ts
+27 −0 src/app/routes/register/_register-theme.scss
+21 −7 src/app/routes/room/dialog/add-customer-room-dialog/add-customer-room-dialog.component.html
+13 −7 src/app/routes/room/dialog/add-customer-room-dialog/add-customer-room-dialog.component.ts
+12 −2 src/app/routes/room/room-list/_room-list-theme.scss
+4 −6 src/app/routes/room/room-list/room-list.component.html
+19 −35 src/app/routes/room/room-list/room-list.component.scss
+29 −20 src/app/routes/room/room-list/room-list.component.ts
+27 −2 src/app/routes/user/user-list/user-list.component.html
+4 −0 src/app/routes/user/user-list/user-list.component.spec.ts
+21 −2 src/app/routes/user/user-list/user-list.component.ts
+14 −12 src/app/shared/components/navbar/navbar.component.html
+61 −6 src/app/shared/components/navbar/navbar.component.ts
+0 −1 src/app/shared/components/skeleton-loader/skeleton-loader-config.types.ts
+35 −33 src/app/shared/components/theme-picker/theme-picker.component.ts
+11 −0 src/app/shared/format.ts
+10 −0 src/app/shared/shared.module.ts
+10 −0 src/app/shared/shared.pipes.module.ts
+ src/assets/icons/icon-128x128.png
+ src/assets/icons/icon-144x144.png
+ src/assets/icons/icon-152x152.png
+ src/assets/icons/icon-192x192.png
+ src/assets/icons/icon-384x384.png
+ src/assets/icons/icon-512x512.png
+ src/assets/icons/icon-72x72.png
+ src/assets/icons/icon-96x96.png
+4 −0 src/index.html
+59 −0 src/manifest.webmanifest
+0 −2 src/styles/helpers/_alignment.scss
+0 −2 src/styles/helpers/_display.scss
+0 −2 src/styles/helpers/_flexbox.scss
+0 −2 src/styles/helpers/_interaction.scss
+0 −2 src/styles/helpers/_object.scss
+0 −2 src/styles/helpers/_overflow.scss
+0 −2 src/styles/helpers/_position.scss
+2 −2 src/test.ts
+5,180 −4,431 yarn.lock
8 changes: 4 additions & 4 deletions src/main/java/org/daming/hoteler/utils/JwtUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ public static String createJWT(String id, String subject, long ttlMillis, Secret
var now = new Date(nowMillis);
var builder = Jwts.builder();
if (Objects.nonNull(claims) && !claims.isEmpty()) {
builder.setClaims(claims);
builder.claims(claims);
}
builder.setId(id).setIssuedAt(now).setSubject(subject).signWith(secretKey);
builder.id(id).issuedAt(now).subject(subject).signWith(secretKey);
if (ttlMillis >= 0L) {
var expMillis = nowMillis + ttlMillis;
var exp = new Date(expMillis);
builder.setExpiration(exp);
builder.expiration(exp);
}
return builder.compact();
}

public static Claims parseJwt(String jwt, SecretKey secretKey) {
var claim = Jwts.parserBuilder().setSigningKey(secretKey).build().parseClaimsJws(jwt).getBody();
var claim = Jwts.parser().verifyWith(secretKey).build().parseSignedClaims(jwt).getPayload();
return claim;
}

Expand Down

0 comments on commit 4f53f13

Please sign in to comment.