forked from github/dataease
feat: ApiKey配置页
This commit is contained in:
parent
a54a126b94
commit
011bebd86e
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 723bb9ff960159769673ac58982f07b18e6aa181
|
||||
Subproject commit f28041745618304f6421a42d3ceaac68b96960a0
|
@ -0,0 +1,25 @@
|
||||
package io.dataease.api.permissions.apikey.api;
|
||||
|
||||
import io.dataease.api.permissions.apikey.dto.ApikeyEnableEditor;
|
||||
import io.dataease.api.permissions.apikey.vo.ApiKeyVO;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ApiKeyApi {
|
||||
|
||||
@PostMapping("/generate")
|
||||
void generate();
|
||||
|
||||
@GetMapping("/query")
|
||||
List<ApiKeyVO> query();
|
||||
|
||||
@PostMapping("/switch")
|
||||
void switchEnable(@RequestBody ApikeyEnableEditor editor);
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
void delete(@PathVariable("id") Long id);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package io.dataease.api.permissions.apikey.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ApikeyEnableEditor implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Boolean enable = false;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package io.dataease.api.permissions.apikey.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ApiKeyVO implements Serializable {
|
||||
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
private String accessKey;
|
||||
|
||||
private String accessSecret;
|
||||
|
||||
private Boolean enable;
|
||||
|
||||
private Long createTime;
|
||||
}
|
Loading…
Reference in New Issue
Block a user