Class SocialUsersAPI


  • @Path("2/users")
    public class SocialUsersAPI
    extends Object
    • Constructor Detail

      • SocialUsersAPI

        public SocialUsersAPI()
    • Method Detail

      • getUserProfile

        @GET
        @Path("get-profile")
        @Produces("application/json")
        public jakarta.ws.rs.core.Response getUserProfile()
        Get the profile associated to the token
        Returns:
        the user's profile. The user is the one owning the token
      • getCurrentEmail

        @GET
        @Path("/get-email")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response getCurrentEmail()
        Read the user's email address. The user is the one owning the token
        Returns:
        rhe user's email address
      • getUserFullname

        @GET
        @Path("get-fullname")
        @Produces("application/json")
        public jakarta.ws.rs.core.Response getUserFullname()
        Read the user's fullname. The user is the one owning the token
        Returns:
        the user's fullname
      • getUsernamesByRole

        @GET
        @Path("/get-all-usernames")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response getUsernamesByRole​(@QueryParam("first") @DefaultValue("0")
                                                              int first,
                                                              @QueryParam("max") @DefaultValue("100")
                                                              int max,
                                                              @QueryParam("firstResult") @DefaultValue("0")
                                                              int firstResult,
                                                              @QueryParam("maxResults") @DefaultValue("100")
                                                              int maxResults)
      • getAllUsernamesFullnames

        @GET
        @Path("/get-all-fullnames-and-usernames")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response getAllUsernamesFullnames​(@QueryParam("emailVerified")
                                                                    Boolean emailVerified,
                                                                    @QueryParam("enabled")
                                                                    Boolean enabled,
                                                                    @QueryParam("first") @DefaultValue("0")
                                                                    int first,
                                                                    @QueryParam("max") @DefaultValue("100")
                                                                    int max,
                                                                    @QueryParam("firstResult") @DefaultValue("0")
                                                                    int firstResult,
                                                                    @QueryParam("maxResults") @DefaultValue("100")
                                                                    int maxResults)
      • getUsernamesByRole

        @GET
        @Path("/get-usernames-by-role")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response getUsernamesByRole​(@QueryParam("role-name")
                                                              String roleName,
                                                              @QueryParam("first") @DefaultValue("0")
                                                              int first,
                                                              @QueryParam("max") @DefaultValue("100")
                                                              int max,
                                                              @QueryParam("firstResult") @DefaultValue("0")
                                                              int firstResult,
                                                              @QueryParam("maxResults") @DefaultValue("100")
                                                              int maxResults)
      • checkUserExists

        @GET
        @Path("/user-exists")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response checkUserExists​(@QueryParam("username")
                                                           String username)
      • readCustomAttr

        @GET
        @Path("get-custom-attribute")
        @Produces("application/json")
        public jakarta.ws.rs.core.Response readCustomAttr​(@QueryParam("username")
                                                          String username,
                                                          @QueryParam("attribute") @NotNull(message="attribute name is missing")
                                                          @NotNull(message="attribute name is missing") String attributeKey)
                                                   throws jakarta.validation.ValidationException
        Read a user's custom attribute. The user is the one owning the token
        Parameters:
        attributeKey - The key of the attribute to be read
        Returns:
        the user's custom attribute
        Throws:
        jakarta.validation.ValidationException
      • getCurrentOAuthProfile

        @GET
        @Path("/get-oauth-profile")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response getCurrentOAuthProfile()
      • getUsernamesByGlobalRole

        @GET
        @Path("get-usernames-by-global-role")
        @Produces("application/json")
        public jakarta.ws.rs.core.Response getUsernamesByGlobalRole​(@QueryParam("role-name")
                                                                    String role_name,
                                                                    @QueryParam("first") @DefaultValue("0")
                                                                    int first,
                                                                    @QueryParam("max") @DefaultValue("100")
                                                                    int max,
                                                                    @QueryParam("firstResult") @DefaultValue("0")
                                                                    int firstResult,
                                                                    @QueryParam("maxResults") @DefaultValue("100")
                                                                    int maxResults)
        Get the list of users having a given global-role, e.g. 'Administrator'. (Legacy)
        Parameters:
        roleName - the name of the role to be checked (e.g. Administrator)
        Returns:
        the list of users having a given global-role