We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e2c67f commit 953ac4aCopy full SHA for 953ac4a
src/main/java/org/gitlab4j/api/UserApi.java
@@ -215,6 +215,19 @@ public void deleteUser(User user) throws GitLabApiException {
215
deleteUser(user.getId());
216
}
217
218
+ /**
219
+ * Get currently authenticated user.
220
+ *
221
+ * GET /user
222
223
+ * @return the User instance for the currently authenticated user
224
+ * @throws GitLabApiException if any exception occurs
225
+ */
226
+ public User getCurrentUser() throws GitLabApiException {
227
+ Response response = get(Response.Status.OK, null, "user");
228
+ return (response.readEntity(User.class));
229
+ }
230
+
231
/**
232
* Get a list of currently authenticated user's SSH keys.
233
*
0 commit comments