Interface SecurityQuestionService
- All Superinterfaces:
JAXRSService
- All Known Implementing Classes:
SecurityQuestionServiceImpl
REST operations for security questions.
-
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 TypeMethodDescriptioncreate
(@NotNull SecurityQuestionTO securityQuestionTO) Creates a new security question.void
Deletes the security question matching the provided key.list()
Returns a list of all security questions.Returns security question with matching key.readByUser
(@NotNull String username) Ask for security question configured for the user matching the given username, if any.void
update
(@NotNull SecurityQuestionTO securityQuestionTO) Updates the security question matching the provided key.
-
Method Details
-
list
@GET @Produces({"application/json","application/yaml","application/xml"}) List<SecurityQuestionTO> list()Returns a list of all security questions.- Returns:
- list of all security questions
-
read
@GET @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) SecurityQuestionTO read(@NotNull @PathParam("key") @NotNull String key) Returns security question with matching key.- Parameters:
key
- security question key to be read- Returns:
- security question with matching key
-
create
@POST @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) Response create(@NotNull @NotNull SecurityQuestionTO securityQuestionTO) Creates a new security question.- Parameters:
securityQuestionTO
- security question to be created- Returns:
- Response object featuring Location header of created security question
-
update
@PUT @Path("{key}") @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) void update(@NotNull @NotNull SecurityQuestionTO securityQuestionTO) Updates the security question matching the provided key.- Parameters:
securityQuestionTO
- security question to be stored
-
delete
@DELETE @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) void delete(@NotNull @PathParam("key") @NotNull String key) Deletes the security question matching the provided key.- Parameters:
key
- security question key to be deleted
-
readByUser
@GET @Path("byUser/{username}") @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) SecurityQuestionTO readByUser(@NotNull @PathParam("username") @NotNull String username) Ask for security question configured for the user matching the given username, if any.- Parameters:
username
- username for which the security question is requested- Returns:
- security question, if configured for the user matching the given username
-