Interface UserResource
-
@Consumes("application/json") @Produces("application/json") public interface UserResource- Author:
- rodrigo.sasaki@icarros.com.br
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description javax.ws.rs.core.ResponseaddFederatedIdentity(String provider, FederatedIdentityRepresentation rep)List<CredentialRepresentation>credentials()voiddisableCredentialType(List<String> credentialTypes)Disables or deletes all credentials for specific types.voidexecuteActionsEmail(String clientId, String redirectUri, Integer lifespan, List<String> actions)Sends an email to the user with a link within it.voidexecuteActionsEmail(String clientId, String redirectUri, List<String> actions)Sends an email to the user with a link within it.voidexecuteActionsEmail(List<String> actions)Sends an email to the user with a link within it.voidexecuteActionsEmail(List<String> actions, Integer lifespan)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, 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()voidjoinGroup(String groupId)voidleaveGroup(String groupId)voidlogout()voidmoveCredentialAfter(String credentialId, String newPreviousCredentialId)Move a credential to a position behind another credentialvoidmoveCredentialToFirst(String credentialId)Move a credential to a first position in the credentials list of the uservoidremove()voidremoveCredential(String credentialId)Remove a credential for a uservoidremoveFederatedIdentity(String provider)voidresetPassword(CredentialRepresentation credentialRepresentation)voidresetPasswordEmail()Deprecated.voidresetPasswordEmail(String clientId)Deprecated.voidrevokeConsent(String clientId)RoleMappingResourceroles()voidsendVerifyEmail()voidsendVerifyEmail(String clientId)voidsetCredentialUserLabel(String credentialId, String userLabel)Update a credential label for a userUserRepresentationtoRepresentation()voidupdate(UserRepresentation userRepresentation)
-
-
-
Method Detail
-
toRepresentation
@GET UserRepresentation toRepresentation()
-
update
@PUT void update(UserRepresentation userRepresentation)
-
remove
@DELETE void remove()
-
groups
@Path("groups") @GET List<GroupRepresentation> 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
@Path("groups/count") @GET Map<String,Long> groupsCount(@QueryParam("search") String search)
-
joinGroup
@Path("groups/{groupId}") @PUT void joinGroup(@PathParam("groupId") String groupId)
-
leaveGroup
@Path("groups/{groupId}") @DELETE void leaveGroup(@PathParam("groupId") String groupId)
-
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
@PUT @Path("reset-password") void resetPassword(CredentialRepresentation credentialRepresentation)
-
resetPasswordEmail
@PUT @Path("reset-password-email") @Deprecated void 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
@PUT @Path("execute-actions-email") void executeActionsEmail(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.- Parameters:
actions- aListof 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- aListof string representation ofUserModel.RequiredActionlifespan-
-
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- aListof 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- aListof string representation ofUserModel.RequiredAction
-
sendVerifyEmail
@PUT @Path("send-verify-email") void sendVerifyEmail()
-
sendVerifyEmail
@PUT @Path("send-verify-email") void sendVerifyEmail(@QueryParam("client_id") String clientId)
-
getUserSessions
@GET @Path("sessions") List<UserSessionRepresentation> getUserSessions()
-
getOfflineSessions
@GET @Path("offline-sessions/{clientId}") List<UserSessionRepresentation> getOfflineSessions(@PathParam("clientId") String clientId)
-
getFederatedIdentity
@GET @Path("federated-identity") List<FederatedIdentityRepresentation> getFederatedIdentity()
-
addFederatedIdentity
@POST @Path("federated-identity/{provider}") javax.ws.rs.core.Response addFederatedIdentity(@PathParam("provider") String provider, FederatedIdentityRepresentation rep)
-
removeFederatedIdentity
@Path("federated-identity/{provider}") @DELETE void removeFederatedIdentity(@PathParam("provider") String provider)
-
roles
@Path("role-mappings") RoleMappingResource roles()
-
revokeConsent
@DELETE @Path("consents/{client}") void revokeConsent(@PathParam("client") String clientId)
-
-