Skip to content

Commit

Permalink
fix: sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Nov 29, 2024
1 parent b776bb9 commit 55045c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ protected void clearExpectation(MockServerClient client) {
MOCK_IDS.clear();
}

static public String createToken(String orgId) {
public static String createToken(String orgId) {
JsonObjectBuilder claims = Json.createObjectBuilder();
claims.add(Claims.preferred_username.name(), "test");
claims.add(Claims.sub.name(), "test");
claims.add("orgId", orgId);
return Jwt.claims(claims.build()).sign(KEY);
}

static PrivateKey KEY = createKey();
static final PrivateKey KEY = createKey();

static PrivateKey createKey() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public SecurityTestConfig getConfig() {
return config;
}

@Override
public void default_security_test(String client, List<String> scopes, Integer expectation, String url, String method) {

var apm = createToken("org1");
Expand Down

0 comments on commit 55045c3

Please sign in to comment.