Class UserEndpoint
java.lang.Object
com.broadleafcommerce.auth.resource.web.endpoint.UserEndpoint
Endpoints for CRUD operations on User.
- Author:
- Samarth Dhruva (samarthd)
-
Constructor Summary
ConstructorDescriptionUserEndpoint
(UserService<User> userSvc, UserPasswordService<PasswordToken, User> userPasswordService, AuthorizedClientService<AuthorizedClient> clientService) -
Method Summary
Modifier and TypeMethodDescriptioncreateUser
(User user, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) void
deleteUser
(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected AuthorizedClientService<AuthorizedClient>
protected UserPasswordService<PasswordToken,
User> protected UserService<User>
org.springframework.data.domain.Page<User>
readAllUsers
(org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) replaceUser
(String id, User user, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) void
resetPassword
(String username, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
Constructor Details
-
UserEndpoint
public UserEndpoint(UserService<User> userSvc, UserPasswordService<PasswordToken, User> userPasswordService, AuthorizedClientService<AuthorizedClient> clientService)
-
-
Method Details
-
readAllUsers
@FrameworkGetMapping @Policy(permissionRoots="AUTH_USER") public org.springframework.data.domain.Page<User> readAllUsers(@PageableDefault(size=50) org.springframework.data.domain.Pageable page, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getUser
-
createUser
-
replaceUser
-
deleteUser
@FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="AUTH_USER") public void deleteUser(@PathVariable("id") String id, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
resetPassword
@FrameworkGetMapping("/{username}/reset-password") @Policy(permissionRoots="AUTH_USER") public void resetPassword(@PathVariable("username") String username, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getUserSvc
-
getUserPasswordService
-
getClientService
-