Interface UserResource


@Consumes("application/json") @Produces("application/json") public interface UserResource
Author:
rodrigo.sasaki@icarros.com.br
  • Method Details

    • toRepresentation

      @GET UserRepresentation toRepresentation()
    • toRepresentation

      @GET UserRepresentation toRepresentation(@QueryParam("userProfileMetadata") boolean userProfileMetadata)
    • 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 move
      newPreviousCredentialId - 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. See UserRepresentation.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 - a List of string representation of UserModel.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 - a List of string representation of UserModel.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 - a List of string representation of UserModel.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 - a List of string representation of UserModel.RequiredAction
    • sendVerifyEmail

      @PUT @Path("send-verify-email") void sendVerifyEmail()
    • sendVerifyEmail

      @PUT @Path("send-verify-email") void sendVerifyEmail(@QueryParam("client_id") String clientId)
    • sendVerifyEmail

      @PUT @Path("send-verify-email") void sendVerifyEmail(@QueryParam("client_id") String clientId, @QueryParam("redirect_uri") String redirectUri)
    • sendVerifyEmail

      @PUT @Path("send-verify-email") void sendVerifyEmail(@QueryParam("lifespan") Integer lifespan)
    • 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 uri
      clientId - Client id
      lifespan - Number of seconds after which the generated token expires
    • 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}") 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

      @Path("role-mappings") RoleMappingResource roles()
    • getConsents

      @GET @Path("consents") List<Map<String,Object>> getConsents()
    • revokeConsent

      @DELETE @Path("consents/{client}") void revokeConsent(@PathParam("client") String clientId)
    • impersonate

      @POST @Path("impersonation") @Produces("application/json") Map<String,Object> impersonate()
    • getUnmanagedAttributes

      @GET @Path("unmanagedAttributes") @Produces("application/json") Map<String,List<String>> getUnmanagedAttributes()