Class UserEndpoint
- java.lang.Object
-
- com.broadleafcommerce.auth.resource.web.endpoint.UserEndpoint
-
@FrameworkRestController @FrameworkMapping("/users") public class UserEndpoint extends Object
Endpoints for CRUD operations on User.- Author:
- Samarth Dhruva (samarthd)
-
-
Constructor Summary
Constructors Constructor Description UserEndpoint(UserService<User> userSvc, UserPasswordService<PasswordToken,User> userPasswordService, AuthorizedClientService<AuthorizedClient> clientService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description User
createUser(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>
getClientService()
User
getUser(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected UserPasswordService<PasswordToken,User>
getUserPasswordService()
protected UserService<User>
getUserSvc()
org.springframework.data.domain.Page<User>
readAllUsers(org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
User
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 Detail
-
UserEndpoint
public UserEndpoint(UserService<User> userSvc, UserPasswordService<PasswordToken,User> userPasswordService, AuthorizedClientService<AuthorizedClient> clientService)
-
-
Method Detail
-
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
@FrameworkGetMapping("/{id}") @Policy(permissionRoots="AUTH_USER") public User getUser(@PathVariable("id") String id, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
createUser
@FrameworkPostMapping @Policy(permissionRoots="AUTH_USER") public User createUser(@RequestBody User user, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
replaceUser
@FrameworkPutMapping("/{id}") @Policy(permissionRoots="AUTH_USER") public User replaceUser(@PathVariable("id") String id, @RequestBody User user, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
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
@NonNull protected UserService<User> getUserSvc()
-
getUserPasswordService
@NonNull protected UserPasswordService<PasswordToken,User> getUserPasswordService()
-
getClientService
@NonNull protected AuthorizedClientService<AuthorizedClient> getClientService()
-
-