Skip to content

Commit 7c9b2d0

Browse files
committed
Show api key only on the creation
1 parent d302efe commit 7c9b2d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
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)