-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #394 from pascalgrimaud/sonar-code-smells-generate…
…d-projects Fix some Sonar Code Smells for generated projects
- Loading branch information
Showing
9 changed files
with
33 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 10 additions & 14 deletions
24
...enerator/server/springboot/mvc/security/jwt/src/ApplicationSecurityDefaults.java.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
package {{packageName}}.security.jwt.infrastructure.config; | ||
|
||
@SuppressWarnings("java:S2386") | ||
public interface ApplicationSecurityDefaults { | ||
interface Security { | ||
String contentSecurityPolicy = | ||
"default-src 'self'; frame-src 'self' data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; | ||
public class ApplicationSecurityDefaults { | ||
interface Authentication { | ||
interface Jwt { | ||
String secret = null; | ||
String base64Secret = null; | ||
long tokenValidityInSeconds = 1800; // 30 minutes | ||
long tokenValidityInSecondsForRememberMe = 2592000; // 30 days | ||
} | ||
} | ||
} | ||
private ApplicationSecurityDefaults() {} | ||
|
||
public static final String CONTENT_SECURITY_POLICY = | ||
"default-src 'self'; frame-src 'self' data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; | ||
|
||
public static final String SECRET = null; | ||
public static final String BASE_64_SECRET = null; | ||
public static final long TOKEN_VALIDITY_IN_SECONDS = 1800; // 30 minutes | ||
public static final long TOKEN_VALIDITY_IN_SECONDS_FOR_REMEMBER_ME = 2592000; // 30 days | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters