Interface UserSelfService
- All Superinterfaces:
JAXRSService
- All Known Implementing Classes:
UserSelfServiceImpl
REST operations for user self-management.
-
Field Summary
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compliance
(@NotNull ComplianceQuery query) Checks compliance of the given username and / or password with applicable policies.void
confirmPasswordReset
(@NotNull String token, String password) Reset the password value for the user matching the provided token, if available and still valid.Self-registration for new user.delete()
Self-deletes user.mustChangePassword
(@NotNull PasswordPatch password) Changes own password when change was forced by an administrator.read()
Returns the user making the service call.void
requestPasswordReset
(@NotNull String username, String securityAnswer) Provides answer for the security question configured for user matching the given username, if any.Self-perform a status update.Self-updates user.Self-updates user.
-
Method Details
-
read
Returns the user making the service call.- Returns:
- calling user data, including own UUID, entitlements and delegations
-
create
@POST @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) Response create(@NotNull @NotNull UserCR createReq) Self-registration for new user.- Parameters:
createReq
- user to be created- Returns:
- Response object featuring Location header of self-registered user as well as the user itself enriched with propagation status information
-
update
@PATCH @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) Response update(@NotNull @NotNull UserUR updateReq) Self-updates user.- Parameters:
updateReq
- modification to be applied to self- Returns:
- Response object featuring the updated user
-
update
@PUT @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) Response update(@NotNull @NotNull UserTO user) Self-updates user.- Parameters:
user
- complete update- Returns:
- Response object featuring the updated user
-
status
@POST @Path("{key}/status") @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) Response status(@NotNull @NotNull StatusR statusR) Self-perform a status update.- Parameters:
statusR
- status update details- Returns:
- Response object featuring the updated user enriched with propagation status information
-
delete
Self-deletes user.- Returns:
- Response object featuring the deleted user
-
mustChangePassword
@POST @Path("mustChangePassword") @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) Response mustChangePassword(@NotNull @NotNull PasswordPatch password) Changes own password when change was forced by an administrator.- Parameters:
password
- the password value to update- Returns:
- Response object featuring the updated user
-
compliance
@POST @Path("compliance") @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) void compliance(@NotNull @NotNull ComplianceQuery query) Checks compliance of the given username and / or password with applicable policies.- Parameters:
query
- compliance query
-
requestPasswordReset
@POST @Path("requestPasswordReset") @Produces({"application/json","application/yaml","application/xml"}) void requestPasswordReset(@NotNull @QueryParam("username") @NotNull String username, String securityAnswer) Provides answer for the security question configured for user matching the given username, if any. If provided answer matches the one stored for that user, a password reset token is internally generated, otherwise an error is returned.- Parameters:
username
- username for which the security answer is providedsecurityAnswer
- actual answer text
-
confirmPasswordReset
@POST @Path("confirmPasswordReset") @Produces({"application/json","application/yaml","application/xml"}) void confirmPasswordReset(@NotNull @QueryParam("token") @NotNull String token, String password) Reset the password value for the user matching the provided token, if available and still valid. If the token actually matches one of users, and if it is still valid at the time of submission, the matching user's password value is set as provided. The new password value will need anyway to comply with all relevant password policies.- Parameters:
token
- password reset tokenpassword
- new password to be set
-