Browse Source

jwt settings code cleanup

pull/7297/head
Sergey Matvienko 4 years ago
parent
commit
b776cf13b6
  1. 1
      application/src/main/java/org/thingsboard/server/config/jwt/JwtSettingsServiceDefault.java
  2. 2
      application/src/main/resources/thingsboard.yml
  3. 2
      lombok.config

1
application/src/main/java/org/thingsboard/server/config/jwt/JwtSettingsServiceDefault.java

@ -44,7 +44,6 @@ public class JwtSettingsServiceDefault implements JwtSettingsService {
static final String ADMIN_SETTINGS_JWT_KEY = "jwt"; static final String ADMIN_SETTINGS_JWT_KEY = "jwt";
static final String TOKEN_SIGNING_KEY_DEFAULT = "thingsboardDefaultSigningKey"; static final String TOKEN_SIGNING_KEY_DEFAULT = "thingsboardDefaultSigningKey";
static final String TB_ALLOW_DEFAULT_JWT_SIGNING_KEY = "TB_ALLOW_DEFAULT_JWT_SIGNING_KEY";
@Lazy @Lazy
private final AdminSettingsService adminSettingsService; private final AdminSettingsService adminSettingsService;
@Lazy @Lazy

2
application/src/main/resources/thingsboard.yml

@ -107,7 +107,7 @@ plugins:
# Security parameters # Security parameters
security: security:
# JWT Token parameters # JWT Token parameters
jwt: # Since 3.5.0 values are persisted to the database during install or upgrade. On Install, the key will be generated randomly if no custom value set. jwt: # Since 3.4.2 values are persisted to the database during install or upgrade. On Install, the key will be generated randomly if no custom value set. You can change it later from Web UI under SYS_ADMIN
tokenExpirationTime: "${JWT_TOKEN_EXPIRATION_TIME:9000}" # Number of seconds (2.5 hours) tokenExpirationTime: "${JWT_TOKEN_EXPIRATION_TIME:9000}" # Number of seconds (2.5 hours)
refreshTokenExpTime: "${JWT_REFRESH_TOKEN_EXPIRATION_TIME:604800}" # Number of seconds (1 week). refreshTokenExpTime: "${JWT_REFRESH_TOKEN_EXPIRATION_TIME:604800}" # Number of seconds (1 week).
tokenIssuer: "${JWT_TOKEN_ISSUER:thingsboard.io}" tokenIssuer: "${JWT_TOKEN_ISSUER:thingsboard.io}"

2
lombok.config

@ -1,3 +1,3 @@
config.stopbubbling = true config.stopbubbling = true
lombok.anyconstructor.addconstructorproperties = true lombok.anyconstructor.addconstructorproperties = true
lombok.copyableAnnotations += org.springframework.context.annotation.Lazy lombok.copyableAnnotations += org.springframework.context.annotation.Lazy

Loading…
Cancel
Save