Skip to content

Commit 41e2af2

Browse files
authoredApr 19, 2025
Merge pull request #1642 from lowcoder-org/hide_api_key
Show api key only on the creation
2 parents d90e28c + 5bdedc9 commit 41e2af2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎.github/workflows/sonarcloud.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3232
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
33-
SONAR_SCANNER_OPTS: "-Dsonar.javascript.node.maxspace=8192 -Xmx512m"
33+
SONAR_SCANNER_OPTS: "-Dsonar.javascript.node.maxspace=8192 -Xmx8192m"

‎server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,10 @@ public Flux<APIKey> findAPIKeys() {
348348
return sessionUserService.getVisitor()
349349
.flatMapIterable(user ->
350350
new ArrayList<>(user.getApiKeysList())
351-
);
351+
)
352+
.doOnNext(apiKey -> {
353+
apiKey.setToken(apiKey.getToken().substring(0, 6) + "*************" + apiKey.getToken().substring(apiKey.getToken().length() - 6));
354+
});
352355
}
353356

354357
private Mono<Void> removeTokensByAuthId(String authId) {

0 commit comments

Comments
 (0)