diff options
Diffstat (limited to 'sonar-ws')
3 files changed, 13 insertions, 1 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java index c0b3214b7d8..f2e2b5de0c3 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java @@ -35,6 +35,7 @@ public class GenerateRequest { private String name; private String type; private String projectKey; + private String expirationDate; /** * Example value: "g.hopper" @@ -78,4 +79,13 @@ public class GenerateRequest { this.projectKey = projectKey; return this; } + + public String getExpirationDate() { + return expirationDate; + } + + public GenerateRequest setExpirationDate(String expirationDate) { + this.expirationDate = expirationDate; + return this; + } } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java index 1539acc65f2..afe2f57fe16 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java @@ -51,7 +51,8 @@ public class UserTokensService extends BaseService { .setParam("login", request.getLogin()) .setParam("name", request.getName()) .setParam("type", request.getType()) - .setParam("projectKey", request.getProjectKey()), + .setParam("projectKey", request.getProjectKey()) + .setParam("expirationDate", request.getExpirationDate()), GenerateWsResponse.parser()); } diff --git a/sonar-ws/src/main/protobuf/ws-user_tokens.proto b/sonar-ws/src/main/protobuf/ws-user_tokens.proto index 786a3bfc5ff..a96d9551ffd 100644 --- a/sonar-ws/src/main/protobuf/ws-user_tokens.proto +++ b/sonar-ws/src/main/protobuf/ws-user_tokens.proto @@ -46,6 +46,7 @@ message SearchWsResponse { optional string lastConnectionDate = 3; optional string type = 4; optional Project project = 5; + optional string expirationDate = 6; message Project { optional string key = 1; |