Interface UserResource
@Consumes("application/json")
@Produces("application/json")
public interface UserResource
- Author:
- rodrigo.sasaki@icarros.com.br
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
addFederatedIdentity
(String provider, FederatedIdentityRepresentation rep) void
disableCredentialType
(List<String> credentialTypes) Disables or deletes all credentials for specific types.void
Sends an email to the user with a link within it.void
executeActionsEmail
(String clientId, String redirectUri, List<String> actions) Sends an email to the user with a link within it.void
executeActionsEmail
(List<String> actions) Sends an email to the user with a link within it.void
executeActionsEmail
(List<String> actions, Integer lifespan) Sends an email to the user with a link within it.Return credential types, which are provided by the user storage where user is stored.getOfflineSessions
(String clientId) groups()
groupsCount
(String search) void
void
leaveGroup
(String groupId) void
logout()
void
moveCredentialAfter
(String credentialId, String newPreviousCredentialId) Move a credential to a position behind another credentialvoid
moveCredentialToFirst
(String credentialId) Move a credential to a first position in the credentials list of the uservoid
remove()
void
removeCredential
(String credentialId) Remove a credential for a uservoid
removeFederatedIdentity
(String provider) void
resetPassword
(CredentialRepresentation credentialRepresentation) void
Deprecated.void
resetPasswordEmail
(String clientId) Deprecated.void
revokeConsent
(String clientId) roles()
void
void
sendVerifyEmail
(Integer lifespan) void
sendVerifyEmail
(String clientId) void
sendVerifyEmail
(String clientId, String redirectUri) void
sendVerifyEmail
(String clientId, String redirectUri, Integer lifespan) Send an email-verification email to the user An email contains a link the user can click to verify their email address.void
setCredentialUserLabel
(String credentialId, String userLabel) Update a credential label for a usertoRepresentation
(boolean userProfileMetadata) void
update
(UserRepresentation userRepresentation)
-
Method Details
-
toRepresentation
-
toRepresentation
@GET UserRepresentation toRepresentation(@QueryParam("userProfileMetadata") boolean userProfileMetadata) -
update
-
remove
@DELETE void remove() -
groups
-
groups
@Path("groups") @GET List<GroupRepresentation> groups(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) -
groups
@Path("groups") @GET List<GroupRepresentation> groups(@QueryParam("search") String search, @QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults) -
groups
@Path("groups") @GET List<GroupRepresentation> groups(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults, @QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation) -
groups
@Path("groups") @GET List<GroupRepresentation> groups(@QueryParam("search") String search, @QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation) -
groups
@Path("groups") @GET List<GroupRepresentation> groups(@QueryParam("search") String search, @QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults, @QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation) -
groupsCount
-
joinGroup
-
leaveGroup
-
logout
@POST @Path("logout") void logout() -
credentials
@GET @Path("credentials") @Produces("application/json") List<CredentialRepresentation> credentials() -
getConfiguredUserStorageCredentialTypes
@GET @Path("configured-user-storage-credential-types") @Produces("application/json") List<String> getConfiguredUserStorageCredentialTypes()Return credential types, which are provided by the user storage where user is stored. Returned values can contain for example "password", "otp" etc. This will always return empty list for "local" users, which are not backed by any user storage- Returns:
-
removeCredential
@DELETE @Path("credentials/{credentialId}") void removeCredential(@PathParam("credentialId") String credentialId) Remove a credential for a user -
setCredentialUserLabel
@PUT @Consumes("text/plain") @Path("credentials/{credentialId}/userLabel") void setCredentialUserLabel(@PathParam("credentialId") String credentialId, String userLabel) Update a credential label for a user -
moveCredentialToFirst
@Path("credentials/{credentialId}/moveToFirst") @POST void moveCredentialToFirst(@PathParam("credentialId") String credentialId) Move a credential to a first position in the credentials list of the user- Parameters:
credentialId
- The credential to move
-
moveCredentialAfter
@Path("credentials/{credentialId}/moveAfter/{newPreviousCredentialId}") @POST void moveCredentialAfter(@PathParam("credentialId") String credentialId, @PathParam("newPreviousCredentialId") String newPreviousCredentialId) Move a credential to a position behind another credential- Parameters:
credentialId
- The credential to movenewPreviousCredentialId
- The credential that will be the previous element in the list. If set to null, the moved credential will be the first element in the list.
-
disableCredentialType
@Path("disable-credential-types") @PUT @Consumes("application/json") void disableCredentialType(List<String> credentialTypes) Disables or deletes all credentials for specific types. Type examples "otp", "password" This is typically supported just for the users backed by user storage providers. SeeUserRepresentation.getDisableableCredentialTypes()
to see what credential types can be disabled for the particular user- Parameters:
credentialTypes
-
-
resetPassword
-
resetPasswordEmail
Deprecated.Use executeActionsEmail and pass in the UPDATE_PASSWORD required action -
resetPasswordEmail
@PUT @Path("reset-password-email") @Deprecated void resetPasswordEmail(@QueryParam("client_id") String clientId) Deprecated.Use executeActionsEmail and pass in the UPDATE_PASSWORD required action -
executeActionsEmail
Sends an email to the user with a link within it. If they click on the link they will be asked to perform some actions i.e.VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD, TERMS_AND_CONDITIONS
, etc.- Parameters:
actions
- aList
of string representation ofUserModel.RequiredAction
-
executeActionsEmail
@PUT @Path("execute-actions-email") void executeActionsEmail(List<String> actions, @QueryParam("lifespan") Integer lifespan) Sends an email to the user with a link within it. If they click on the link they will be asked to perform some actions i.e.VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD, TERMS_AND_CONDITIONS
, etc. The lifespan decides the number of seconds after which the generated token in the email link expires. The default value is 12 hours.- Parameters:
actions
- aList
of string representation ofUserModel.RequiredAction
lifespan
-
-
executeActionsEmail
@PUT @Path("execute-actions-email") void executeActionsEmail(@QueryParam("client_id") String clientId, @QueryParam("redirect_uri") String redirectUri, @QueryParam("lifespan") Integer lifespan, List<String> actions) Sends an email to the user with a link within it. If they click on the link they will be asked to perform some actions i.e.VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD, TERMS_AND_CONDITIONS
, etc. If redirectUri is not null, then you must specify a client id. This will set the URI you want the flow to link to after the email link is clicked and actions completed. If both parameters are null, then no page is linked to at the end of the flow. The lifespan decides the number of seconds after which the generated token in the email link expires. The default value is 12 hours.- Parameters:
clientId
-redirectUri
-lifespan
-actions
- aList
of string representation ofUserModel.RequiredAction
-
executeActionsEmail
@PUT @Path("execute-actions-email") void executeActionsEmail(@QueryParam("client_id") String clientId, @QueryParam("redirect_uri") String redirectUri, List<String> actions) Sends an email to the user with a link within it. If they click on the link they will be asked to perform some actions i.e.VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD, TERMS_AND_CONDITIONS
, etc. If redirectUri is not null, then you must specify a client id. This will set the URI you want the flow to link to after the email link is clicked and actions completed. If both parameters are null, then no page is linked to at the end of the flow.- Parameters:
clientId
-redirectUri
-actions
- aList
of string representation ofUserModel.RequiredAction
-
sendVerifyEmail
@PUT @Path("send-verify-email") void sendVerifyEmail() -
sendVerifyEmail
-
sendVerifyEmail
-
sendVerifyEmail
-
sendVerifyEmail
@PUT @Path("send-verify-email") void sendVerifyEmail(@QueryParam("client_id") String clientId, @QueryParam("redirect_uri") String redirectUri, @QueryParam("lifespan") Integer lifespan) Send an email-verification email to the user An email contains a link the user can click to verify their email address. The redirectUri and clientId parameters are optional. The default for the redirect is the account client. The default for the lifespan is 12 hours.- Parameters:
redirectUri
- Redirect uriclientId
- Client idlifespan
- Number of seconds after which the generated token expires
-
getUserSessions
-
getOfflineSessions
@GET @Path("offline-sessions/{clientId}") List<UserSessionRepresentation> getOfflineSessions(@PathParam("clientId") String clientId) -
getFederatedIdentity
-
addFederatedIdentity
@POST @Path("federated-identity/{provider}") jakarta.ws.rs.core.Response addFederatedIdentity(@PathParam("provider") String provider, FederatedIdentityRepresentation rep) -
removeFederatedIdentity
@Path("federated-identity/{provider}") @DELETE void removeFederatedIdentity(@PathParam("provider") String provider) -
roles
-
getConsents
-
revokeConsent
-
impersonate
-