Package lumis.portal.user
Class UserResource
- java.lang.Object
-
- lumis.portal.user.UserResource
-
@StableMinor(version="16.1", sinceVersion="8.0") @Path("/lumis/authentication/users") public class UserResource extends java.lang.Object
REST API related to portal users.- Since:
- 8.0.0
- Version:
- $Revision: 26156 $ $Date: 2024-01-13 10:26:46 -0300 (Sat, 13 Jan 2024) $
-
-
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 java.lang.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 java.lang.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
-
-