Class UserController
- java.lang.Object
-
- edu.cnm.deepdive.picmegallery.controller.UserController
-
@RestController @RequestMapping("/users") @ExposesResourceFor(User.class) public class UserController extends Object
This class is a @RestController that handles endpoints for communication between the client side and the serverside for the User.
-
-
Constructor Summary
Constructors Constructor Description UserController(UserService userService)
This Constructor creates a UserService object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description User
me(org.springframework.security.core.Authentication auth)
This is a get method that returns the current authenticated user.
-
-
-
Constructor Detail
-
UserController
public UserController(UserService userService)
This Constructor creates a UserService object.- Parameters:
userService
- calls on UserService class.
-
-
Method Detail
-
me
@GetMapping(value="/me", produces="application/json") public User me(org.springframework.security.core.Authentication auth)
This is a get method that returns the current authenticated user.- Parameters:
auth
- is an authentication object.- Returns:
- Returns the current authenticated user.
-
-