Package lumis.portal.user
Class UserResource
- java.lang.Object
-
- lumis.portal.user.UserResource
-
@StableMinor(version="14.2", sinceVersion="8.0") @Path("/lumis/authentication/users") public class UserResource extends Object
REST API related to portal users.- Since:
- 8.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Constructor Summary
Constructors Constructor Description UserResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserConfig
getCurrentUser()
Returns the current logged in user.Response
isMember(@NotBlank String groupAlias)
Returnstrue
if the user of the given session is member of the group with the given alias orfalse
otherwise.
-
-
-
Method Detail
-
getCurrentUser
@GET @Path("/current") @Produces("application/json") public UserConfig getCurrentUser() throws PortalException
Returns the current logged in user. Sample response body:{ "id":"8A488AF9475E73CD01475FEAEC140F88", "login":"johnsmith", "name":"John Stuart Smith", "firstName":"John", "middleName":"Stuart", "lastName":"Smith", "profileImageHref":"http://localhost:8080/portal/lumis/api/rest/lum-internal/users/8A488AF9475E73CD01475FEAEC140F88/profileimage" }
- Returns:
- the logged in user.
- Throws:
PortalException
- Since:
- 8.0.0
-
isMember
@Path("/current/isMemberOf/{groupAlias:[^/]{1,100}}") @GET @Produces("application/json") public Response isMember(@PathParam("groupAlias") @NotBlank @NotBlank String groupAlias) throws PortalException
Returnstrue
if the user of the given session is member of the group with the given alias orfalse
otherwise.- Parameters:
groupAlias
- the group alias.userSessionId
- the user session identifier.- Returns:
true
if the user of the given session is member of the group with the given alias orfalse
otherwise.- Throws:
PortalException
- Since:
- 11.1.0
-
-