From eb8c017fb369e7d8012b2ec5d43447dca497fdd2 Mon Sep 17 00:00:00 2001 From: ksaleschus Date: Wed, 6 Nov 2024 16:43:49 +0100 Subject: [PATCH] adjust commentary --- .../java/org/gitlab4j/api/PersonalAccessTokenApi.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java b/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java index c766ed92..b0fa8a4e 100644 --- a/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java +++ b/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java @@ -34,7 +34,7 @@ public PersonalAccessToken rotatePersonalAccessToken() throws GitLabApiException /** * Rotates the given personal access token. - * The token is revoked and a new one which will expire in one week is created to replace it. + * The token is revoked and a new one which will expire at the given expiresAt-date is created to replace it. * Only working with GitLab 16.0 and above. * *
GitLab Endpoint: POST /personal_access_tokens/self/rotate
@@ -48,12 +48,13 @@ public PersonalAccessToken rotatePersonalAccessToken(Date expiresAt) throws GitL } /** - * Rotates the given personal access token. - * The token is revoked and a new one which will expire in one week is created to replace it. + * Rotates a specific personal access token. + * The token is revoked and a new one which will expire at the given expiresAt-date is created to replace it. * Only working with GitLab 16.0 and above. * - *
GitLab Endpoint: POST /personal_access_tokens/:id/rotate
+ *
GitLab Endpoint: POST /personal_access_tokens/:id
* + * @param id ID of the personal access token * @param expiresAt Expiration date of the access token * @return the newly created PersonalAccessToken. * @throws GitLabApiException if any exception occurs