Class UserResource


  • @StableMinor(version="14.0",
                 sinceVersion="8.0")
    @Path("/lumis/authentication/users")
    public class UserResource
    extends Object
    REST API related to portal users.
    Since:
    8.0.0
    Version:
    $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
    • Constructor Detail

      • UserResource

        public UserResource()
    • 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
                                 String groupAlias)
                          throws PortalException
        Returns true if the user of the given session is member of the group with the given alias or false 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 or false otherwise.
        Throws:
        PortalException
        Since:
        11.1.0