@@ -33,7 +33,7 @@ public PersonalAccessToken rotatePersonalAccessToken() throws GitLabApiException
33
33
}
34
34
35
35
/**
36
- * Rotates the given personal access token.
36
+ * Rotates the personal access token used in the request header .
37
37
* The token is revoked and a new one which will expire at the given expiresAt-date is created to replace it.
38
38
* Only working with GitLab 16.0 and above.
39
39
*
@@ -52,7 +52,7 @@ public PersonalAccessToken rotatePersonalAccessToken(Date expiresAt) throws GitL
52
52
* The token is revoked and a new one which will expire at the given expiresAt-date is created to replace it.
53
53
* Only working with GitLab 16.0 and above.
54
54
*
55
- * <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id</code></pre>
55
+ * <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id/rotate </code></pre>
56
56
*
57
57
* @param id ID of the personal access token
58
58
* @param expiresAt Expiration date of the access token
@@ -67,12 +67,12 @@ public PersonalAccessToken rotatePersonalAccessToken(String id, Date expiresAt)
67
67
}
68
68
69
69
/**
70
- * Get information about a given access token.
70
+ * Get information about the personal access token used in the request header .
71
71
* Only working with GitLab 16.0 and above.
72
72
*
73
- * <pre><code>GitLab Endpoint: POST /personal_access_tokens/self</code></pre>
73
+ * <pre><code>GitLab Endpoint: GET /personal_access_tokens/self</code></pre>
74
74
*
75
- * @return the newly created PersonalAccessToken.
75
+ * @return the specified PersonalAccessToken.
76
76
* @throws GitLabApiException if any exception occurs
77
77
*/
78
78
public PersonalAccessToken getPersonalAccessToken () throws GitLabApiException {
@@ -83,14 +83,14 @@ public PersonalAccessToken getPersonalAccessToken() throws GitLabApiException {
83
83
* Get a specific personal access token.
84
84
* Only working with GitLab 16.0 and above.
85
85
*
86
- * <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id</code></pre>
86
+ * <pre><code>GitLab Endpoint: GET /personal_access_tokens/:id</code></pre>
87
87
*
88
88
* @param id ID of the personal access token
89
89
* @return the specified PersonalAccessToken.
90
90
* @throws GitLabApiException if any exception occurs
91
91
*/
92
92
public PersonalAccessToken getPersonalAccessToken (String id ) throws GitLabApiException {
93
93
Response response = get (Response .Status .OK , null , "personal_access_tokens" , id );
94
- return (response .readEntity (PersonalAccessToken .class ));
94
+ return (response .readEntity (PersonalAccessToken .class ));
95
95
}
96
96
}
0 commit comments