@Consumes(value="application/json")
@Produces(value="application/json")
public interface UserResource
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addFederatedIdentity(String provider,
FederatedIdentityRepresentation rep) |
List<CredentialRepresentation> |
credentials() |
void |
disableCredentialType(List<String> credentialTypes)
Disables or deletes all credentials for specific types.
|
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.
|
void |
executeActionsEmail(String clientId,
String redirectUri,
Integer lifespan,
List<String> actions)
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.
|
List<String> |
getConfiguredUserStorageCredentialTypes()
Return credential types, which are provided by the user storage where user is stored.
|
List<Map<String,Object>> |
getConsents() |
List<FederatedIdentityRepresentation> |
getFederatedIdentity() |
List<UserSessionRepresentation> |
getOfflineSessions(String clientId) |
List<UserSessionRepresentation> |
getUserSessions() |
List<GroupRepresentation> |
groups() |
List<GroupRepresentation> |
groups(Integer firstResult,
Integer maxResults) |
List<GroupRepresentation> |
groups(Integer firstResult,
Integer maxResults,
boolean briefRepresentation) |
List<GroupRepresentation> |
groups(String search,
Integer firstResult,
Integer maxResults) |
List<GroupRepresentation> |
groups(String search,
Integer firstResult,
Integer maxResults,
boolean briefRepresentation) |
Map<String,Long> |
groupsCount(String search) |
Map<String,Object> |
impersonate() |
void |
joinGroup(String groupId) |
void |
leaveGroup(String groupId) |
void |
logout() |
void |
moveCredentialAfter(String credentialId,
String newPreviousCredentialId)
Move a credential to a position behind another credential
|
void |
moveCredentialToFirst(String credentialId)
Move a credential to a first position in the credentials list of the user
|
void |
remove() |
void |
removeCredential(String credentialId)
Remove a credential for a user
|
void |
removeFederatedIdentity(String provider) |
void |
resetPassword(CredentialRepresentation credentialRepresentation) |
void |
resetPasswordEmail()
Deprecated.
|
void |
resetPasswordEmail(String clientId)
Deprecated.
|
void |
revokeConsent(String clientId) |
RoleMappingResource |
roles() |
void |
sendVerifyEmail() |
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 user
|
UserRepresentation |
toRepresentation() |
void |
update(UserRepresentation userRepresentation) |
@GET UserRepresentation toRepresentation()
@PUT void update(UserRepresentation userRepresentation)
@DELETE void remove()
@Path(value="groups") @GET List<GroupRepresentation> groups()
@Path(value="groups") @GET List<GroupRepresentation> groups(@QueryParam(value="first") Integer firstResult, @QueryParam(value="max") Integer maxResults)
@Path(value="groups") @GET List<GroupRepresentation> groups(@QueryParam(value="search") String search, @QueryParam(value="first") Integer firstResult, @QueryParam(value="max") Integer maxResults)
@Path(value="groups") @GET List<GroupRepresentation> groups(@QueryParam(value="first") Integer firstResult, @QueryParam(value="max") Integer maxResults, @QueryParam(value="briefRepresentation") @DefaultValue(value="true") boolean briefRepresentation)
@Path(value="groups") @GET List<GroupRepresentation> groups(@QueryParam(value="search") String search, @QueryParam(value="first") Integer firstResult, @QueryParam(value="max") Integer maxResults, @QueryParam(value="briefRepresentation") @DefaultValue(value="true") boolean briefRepresentation)
@Path(value="groups/count") @GET Map<String,Long> groupsCount(@QueryParam(value="search") String search)
@Path(value="groups/{groupId}") @PUT void joinGroup(@PathParam(value="groupId") String groupId)
@Path(value="groups/{groupId}") @DELETE void leaveGroup(@PathParam(value="groupId") String groupId)
@POST @Path(value="logout") void logout()
@GET @Path(value="credentials") @Produces(value="application/json") List<CredentialRepresentation> credentials()
@GET @Path(value="configured-user-storage-credential-types") @Produces(value="application/json") List<String> getConfiguredUserStorageCredentialTypes()
@DELETE @Path(value="credentials/{credentialId}") void removeCredential(@PathParam(value="credentialId") String credentialId)
@PUT @Consumes(value="text/plain") @Path(value="credentials/{credentialId}/userLabel") void setCredentialUserLabel(@PathParam(value="credentialId") String credentialId, String userLabel)
@Path(value="credentials/{credentialId}/moveToFirst") @POST void moveCredentialToFirst(@PathParam(value="credentialId") String credentialId)
credentialId
- The credential to move@Path(value="credentials/{credentialId}/moveAfter/{newPreviousCredentialId}") @POST void moveCredentialAfter(@PathParam(value="credentialId") String credentialId, @PathParam(value="newPreviousCredentialId") String newPreviousCredentialId)
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.@Path(value="disable-credential-types") @PUT @Consumes(value="application/json") void disableCredentialType(List<String> credentialTypes)
UserRepresentation.getDisableableCredentialTypes()
to see what credential types can be disabled for the particular usercredentialTypes
- @PUT @Path(value="reset-password") void resetPassword(CredentialRepresentation credentialRepresentation)
@PUT @Path(value="reset-password-email") @Deprecated void resetPasswordEmail()
@PUT @Path(value="reset-password-email") @Deprecated void resetPasswordEmail(@QueryParam(value="client_id") String clientId)
@PUT @Path(value="execute-actions-email") void executeActionsEmail(List<String> actions)
VERIFY_EMAIL, UPDATE_PROFILE, CONFIGURE_TOTP, UPDATE_PASSWORD, TERMS_AND_CONDITIONS
, etc.actions
- a List
of string representation of UserModel.RequiredAction
@PUT @Path(value="execute-actions-email") void executeActionsEmail(List<String> actions, @QueryParam(value="lifespan") Integer lifespan)
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.actions
- a List
of string representation of UserModel.RequiredAction
lifespan
- @PUT @Path(value="execute-actions-email") void executeActionsEmail(@QueryParam(value="client_id") String clientId, @QueryParam(value="redirect_uri") String redirectUri, @QueryParam(value="lifespan") Integer lifespan, List<String> actions)
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.clientId
- redirectUri
- lifespan
- actions
- a List
of string representation of UserModel.RequiredAction
@PUT @Path(value="execute-actions-email") void executeActionsEmail(@QueryParam(value="client_id") String clientId, @QueryParam(value="redirect_uri") String redirectUri, List<String> actions)
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.clientId
- redirectUri
- actions
- a List
of string representation of UserModel.RequiredAction
@PUT @Path(value="send-verify-email") void sendVerifyEmail()
@PUT @Path(value="send-verify-email") void sendVerifyEmail(@QueryParam(value="client_id") String clientId)
@PUT @Path(value="send-verify-email") void sendVerifyEmail(@QueryParam(value="client_id") String clientId, @QueryParam(value="redirect_uri") String redirectUri)
@PUT @Path(value="send-verify-email") void sendVerifyEmail(@QueryParam(value="lifespan") Integer lifespan)
@PUT @Path(value="send-verify-email") void sendVerifyEmail(@QueryParam(value="client_id") String clientId, @QueryParam(value="redirect_uri") String redirectUri, @QueryParam(value="lifespan") Integer lifespan)
redirectUri
- Redirect uriclientId
- Client idlifespan
- Number of seconds after which the generated token expires@GET @Path(value="sessions") List<UserSessionRepresentation> getUserSessions()
@GET @Path(value="offline-sessions/{clientId}") List<UserSessionRepresentation> getOfflineSessions(@PathParam(value="clientId") String clientId)
@GET @Path(value="federated-identity") List<FederatedIdentityRepresentation> getFederatedIdentity()
@POST @Path(value="federated-identity/{provider}") javax.ws.rs.core.Response addFederatedIdentity(@PathParam(value="provider") String provider, FederatedIdentityRepresentation rep)
@Path(value="federated-identity/{provider}") @DELETE void removeFederatedIdentity(@PathParam(value="provider") String provider)
@Path(value="role-mappings") RoleMappingResource roles()
@DELETE @Path(value="consents/{client}") void revokeConsent(@PathParam(value="client") String clientId)
Copyright © 2025 JBoss by Red Hat. All rights reserved.