Skip to content

Commit 01563c7

Browse files
committed
Revert "concord-server: return API key name"
This reverts commit d6df59a.
1 parent f4eef25 commit 01563c7

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

server/impl/src/main/java/com/walmartlabs/concord/server/security/apikey/ApiKeyDao.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ public void update(UUID keyId, String key, OffsetDateTime expiredAt) {
9494
tx(tx -> tx.update(API_KEYS)
9595
.set(API_KEYS.API_KEY, hash(key))
9696
.set(API_KEYS.EXPIRED_AT, expiredAt)
97-
.where(API_KEYS.KEY_ID.eq(keyId))
98-
.execute());
97+
.where(API_KEYS.KEY_ID.eq(keyId)));
9998
}
10099

101100
public void delete(UUID id) {

server/impl/src/main/java/com/walmartlabs/concord/server/security/apikey/ApiKeyManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public CreateApiKeyResponse createApiKey(UUID userId, String name, @Nullable Str
148148
.field("userId", userId)
149149
.log();
150150

151-
return new CreateApiKeyResponse(id, name, key, OperationResult.CREATED);
151+
return new CreateApiKeyResponse(id, key, OperationResult.CREATED);
152152
}
153153

154154
public CreateApiKeyResponse updateApiKey(UUID id, UUID userId, String name, @Nullable String key) {
@@ -170,7 +170,7 @@ public CreateApiKeyResponse updateApiKey(UUID id, UUID userId, String name, @Nul
170170
.field("userId", userId)
171171
.log();
172172

173-
return new CreateApiKeyResponse(id, name, key, OperationResult.UPDATED);
173+
return new CreateApiKeyResponse(id, key, OperationResult.UPDATED);
174174
}
175175

176176
public void deleteById(UUID id) {

server/impl/src/main/java/com/walmartlabs/concord/server/security/apikey/CreateApiKeyResponse.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,23 @@
2424
import com.fasterxml.jackson.annotation.JsonProperty;
2525
import com.walmartlabs.concord.server.OperationResult;
2626

27-
import java.io.Serial;
2827
import java.io.Serializable;
2928
import java.util.UUID;
3029

3130
public class CreateApiKeyResponse implements Serializable {
3231

33-
@Serial
3432
private static final long serialVersionUID = 1L;
3533

3634
private final boolean ok = true;
3735
private final UUID id;
38-
private final String name;
3936
private final String key;
4037
private final OperationResult result;
4138

4239
@JsonCreator
4340
public CreateApiKeyResponse(@JsonProperty("id") UUID id,
44-
@JsonProperty("name") String name,
4541
@JsonProperty("key") String key,
4642
@JsonProperty("result") OperationResult result) {
4743
this.id = id;
48-
this.name = name;
4944
this.key = key;
5045
this.result = result;
5146
}
@@ -54,10 +49,6 @@ public UUID getId() {
5449
return id;
5550
}
5651

57-
public String getName() {
58-
return name;
59-
}
60-
6152
public String getKey() {
6253
return key;
6354
}
@@ -76,7 +67,6 @@ public String toString() {
7667
"ok=" + ok +
7768
", result='" + result + '\'' +
7869
", id=" + id +
79-
", name=" + name +
8070
", key='" + key + '\'' +
8171
'}';
8272
}

0 commit comments

Comments
 (0)