Commit 953ac4af authored by Greg Messner's avatar Greg Messner
Browse files

Added getCurrentUser().

parent 2e2c67fc
......@@ -215,6 +215,19 @@ public class UserApi extends AbstractApi {
deleteUser(user.getId());
}
/**
* Get currently authenticated user.
*
* GET /user
*
* @return the User instance for the currently authenticated user
* @throws GitLabApiException if any exception occurs
*/
public User getCurrentUser() throws GitLabApiException {
Response response = get(Response.Status.OK, null, "user");
return (response.readEntity(User.class));
}
/**
* Get a list of currently authenticated user's SSH keys.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment