Skip to content

Commit

Permalink
adjust commentary
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinSaleschus committed Nov 6, 2024
1 parent bc47a48 commit eb8c017
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/self/rotate</code></pre>
Expand All @@ -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.
*
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id/rotate</code></pre>
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id</code></pre>
*
* @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
Expand Down

0 comments on commit eb8c017

Please sign in to comment.