Package org.gcube.service.idm.rest
Class SocialUsersAPI
- java.lang.Object
-
- org.gcube.service.idm.rest.SocialUsersAPI
-
@Path("2/users") public class SocialUsersAPI extends Object
-
-
Constructor Summary
Constructors Constructor Description SocialUsersAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.ws.rs.core.ResponsecheckUserExists(String username)jakarta.ws.rs.core.ResponsegetAllUsernamesFullnames(Boolean emailVerified, Boolean enabled, int first, int max, int firstResult, int maxResults)jakarta.ws.rs.core.ResponsegetCurrentEmail()Read the user's email address.jakarta.ws.rs.core.ResponsegetCurrentOAuthProfile()jakarta.ws.rs.core.ResponsegetUserFullname()Read the user's fullname.jakarta.ws.rs.core.ResponsegetUsernamesByGlobalRole(String role_name, int first, int max, int firstResult, int maxResults)Get the list of users having a given global-role, e.g.jakarta.ws.rs.core.ResponsegetUsernamesByRole(int first, int max, int firstResult, int maxResults)jakarta.ws.rs.core.ResponsegetUsernamesByRole(String roleName, int first, int max, int firstResult, int maxResults)jakarta.ws.rs.core.ResponsegetUserProfile()Get the profile associated to the tokenjakarta.ws.rs.core.ResponsereadCustomAttr(String username, @NotNull(message="attribute name is missing") String attributeKey)Read a user's custom attribute.
-
-
-
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.ValidationExceptionRead 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
-
-